[Webkit-unassigned] [Bug 236995] Use ArgumentParser for parsing args in generate-compile-commands

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 21 18:38:03 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236995

--- Comment #4 from Brandon <brandonstewart at apple.com> ---
(In reply to Alexey Proskuryakov from comment #2)
> Comment on attachment 452771 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452771&action=review
> 
> > Tools/Scripts/generate-compile-commands:39
> > +parser = argparse.ArgumentParser(description='Generate compile_commands.json', usage='generate-compile-commands WebKitBuild/Release')
> 
> Can/should this say something about how it's used overall, via `make
> EXPORT_COMPILE_COMMANDS=YES`? I've been following this project relatively
> closely, and yet I'm not sure how to set up code completion in BBEdit using
> this.
> 
> Or maybe there could be a wiki page, linked from here.
> 

Created a page on trac on how to setup clangd.
https://trac.webkit.org/wiki/Clangd

It may be useful to link to the trac page in this command.

> > Tools/Scripts/generate-compile-commands:40
> > +parser.add_argument('built_products_dir', help='path to the build directory containing generated compile commands (ex: WebKitBuild/Release)')
> 
> This seems like it should be required=True

If you call generate-compile-comamnds without an argument it will throw an error with a description on how to use it.

> generate-compile-commands
usage: generate-compile-commands WebKitBuild/Release
generate-compile-commands: error: the following arguments are required: built_products_dir

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220222/30cf54e7/attachment.htm>


More information about the webkit-unassigned mailing list