|
25 | 25 | import csv
|
26 | 26 |
|
27 | 27 | SCRIPT_NAME = 'Tools/build/stable_abi.py'
|
| 28 | +DEFAULT_MANIFEST_PATH = ( |
| 29 | + Path(__file__).parent / '../../Misc/stable_abi.toml').resolve() |
28 | 30 | MISSING = object()
|
29 | 31 |
|
30 | 32 | EXCLUDED_HEADERS = {
|
@@ -641,8 +643,9 @@ def main():
|
641 | 643 | formatter_class=argparse.RawDescriptionHelpFormatter,
|
642 | 644 | )
|
643 | 645 | parser.add_argument(
|
644 |
| - "file", type=Path, metavar='FILE', |
645 |
| - help="file with the stable abi manifest", |
| 646 | + "file", type=Path, metavar='FILE', nargs='?', |
| 647 | + default=DEFAULT_MANIFEST_PATH, |
| 648 | + help=f"file with the stable abi manifest (default: {DEFAULT_MANIFEST_PATH})", |
646 | 649 | )
|
647 | 650 | parser.add_argument(
|
648 | 651 | "--generate", action='store_true',
|
@@ -684,7 +687,7 @@ def main():
|
684 | 687 |
|
685 | 688 | if args.list:
|
686 | 689 | for gen in generators:
|
687 |
| - print(f'{gen.arg_name}: {base_path / gen.default_path}') |
| 690 | + print(f'{gen.arg_name}: {(base_path / gen.default_path).resolve()}') |
688 | 691 | sys.exit(0)
|
689 | 692 |
|
690 | 693 | run_all_generators = args.generate_all
|
@@ -735,8 +738,10 @@ def main():
|
735 | 738 |
|
736 | 739 | if not results:
|
737 | 740 | if args.generate:
|
738 |
| - parser.error('No file specified. Use --help for usage.') |
739 |
| - parser.error('No check specified. Use --help for usage.') |
| 741 | + parser.error('No file specified. Use --generate-all to regenerate ' |
| 742 | + + 'all files, or --help for usage.') |
| 743 | + parser.error('No check specified. Use --all to check all files, ' |
| 744 | + + 'or --help for usage.') |
740 | 745 |
|
741 | 746 | failed_results = [name for name, result in results.items() if not result]
|
742 | 747 |
|
|
0 commit comments