-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add -restrict option; restrict symbol generation to JSON file #43
Conversation
@@ -61,5 +61,6 @@ A few notes about the flags to `generate`: | |||
- `version`: The API version to generate. The `all` pseudo-version includes all functions and enumerations for the specified API. | |||
- `profile`: For `gl` packages with version 3.2 or higher, `core` or `compatibility` ([explanation](http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts)). | |||
- `addext`: A regular expression describing which extensions to include. `.*` by default, including everything. | |||
- `restrict`: A JSON file that explicitly lists what enumerations / functions that Glow should generate (see example.json). |
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.
I think this control obsoletes the addext
and remext
flags. Perhaps we could consider pulling out the functionality in this change? Otherwise we can take a separate clean-up pass.
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.
I'm not so certain. Other people may be using addext/remext today and want it to keep working. Also it allows for a regular expression which could be more useful in certain situations -- don't think these options overlap each-other but instead compliment one another.
If you want, I can remove them though.
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.
Let's keep the parameters for now. Over the long term perhaps the right answer is to allow the JSON file to specify direct and regex inclusion parameters. Until then I agree we should keep a consistent API.
I will update this PR once #41 is completed. |
I've merged #41 here and made the fixes you suggested. |
Add -restrict option to restrict symbol generation to JSON file.
Fixes #42