Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate-compile-commands --delete-invalid #5731

Conversation

@squelart squelart self-assigned this Oct 25, 2022
@squelart squelart added Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases WebKit Nightly Build labels Oct 25, 2022
@@ -45,6 +45,7 @@ parser = argparse.ArgumentParser(description='Generate compile_commands.json',
""")

parser.add_argument('built_products_dir', help='path to the build directory containing generated compile commands (ex: WebKitBuild/Release)')
parser.add_argument('--delete-invalid', action='store_true', help='Delete any invalid json file')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you usually need to say the -- here? also, unfortunate that it mismatches the other argument in _ vs. -, but yours seems more correct to me.

Copy link
Contributor Author

@squelart squelart Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- denotes an optional argument, without it it would be a compulsory "positional" argument. https://docs.python.org/3/library/argparse.html#name-or-flags

But yes, there's a discrepancy between _ and -, and I also believe dashes - to be more correct or at least traditional. Should I fix built-products-dir? (In a separate patch, good for me as a newbie!)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it!

And yeah, maybe see if you can fix built-products-dir separately :)

@hortont424 hortont424 added the merge-queue Applied to send a pull request to merge-queue label Oct 25, 2022
https://bugs.webkit.org/show_bug.cgi?id=246984
<rdar://problem/101526717>

Reviewed by Tim Horton.

This option will remove invalid json files that may accumulate between rebuilds.

* Tools/Scripts/generate-compile-commands:

Canonical link: https://commits.webkit.org/255942@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/generate-compile-commands--delete-invalid branch from 3f68ee0 to a74c9a0 Compare October 25, 2022 04:36
@webkit-commit-queue webkit-commit-queue merged commit a74c9a0 into WebKit:main Oct 25, 2022
@webkit-commit-queue
Copy link
Collaborator

Committed 255942@main (a74c9a0): https://commits.webkit.org/255942@main

Reviewed commits have been landed. Closing PR #5731 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
4 participants