-
Notifications
You must be signed in to change notification settings - Fork 745
Use docopt for argument parsing #44
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
Conversation
This commit switches bindgen over to using the docopt crate for argument parsing instead of manual argument parsing. This required two notable changes in the arguments and flags style: 1. All flags of the form `-foo` are now of the form `--foo`. 2. We can no longer pass unknown flags straight through to clang. Instead, the user appends `--` after the bindgen flags and input header, after which point any more flags and arguments get collected and passed to clang. This required changes to the test runner and the `// bindgen-flags` comments.
[dependencies.quasi] | ||
features = ["with-syntex"] | ||
version = "0.15" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using cargo add
really goes to town with reformatting toml files... I can revert this and add the dependency manually, if you'd prefer.
Wohoo, thanks for doing this! :-) I'll merge it, though now I'll have to rebase stuff and change scripts :P @bors-servo: r+ |
📌 Commit 1826827 has been approved by |
⚡ Test exempted - status |
Use docopt for argument parsing This commit switches bindgen over to using the docopt crate for argument parsing instead of manual argument parsing. This required two notable changes in the arguments and flags style: 1. All flags of the form `-foo` are now of the form `--foo`. 2. We can no longer pass unknown flags straight through to clang. Instead, the user appends `--` after the bindgen flags and input header, after which point any more flags and arguments get collected and passed to clang. This required changes to the test runner and the `// bindgen-flags` comments. r? @emilio
This needs a corresponding PR to the servo side (regen.py), btw |
Was the first thing I did a few hours ago: servo/servo#13079 Feel free to review it :P |
Thanks for merging :) Will need to update |
This commit switches bindgen over to using the docopt crate for argument parsing
instead of manual argument parsing. This required two notable changes in the
arguments and flags style:
-foo
are now of the form--foo
.user appends
--
after the bindgen flags and input header, after which pointany more flags and arguments get collected and passed to clang. This required
changes to the test runner and the
// bindgen-flags
comments.r? @emilio