-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
Hook the Rust options parser into Python (not for review) #20865
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The python options parser allows default=None, so we must support it in the rust parser. A None value can currently only be obtained via a default of None: if a default is not None then the option will have that value if it doesn't take a non-None value from some other source. We don't currently support setting a value to None in args/env/config in Python, so we don't support it here either. However the data structures could support this if we want to in the future.
If the scope name is foo.bar, the env var should start with PANTS_FOO_BAR_, as is done in the Python parser. In practice dots aren't allowed in scope names, and a dotted scope indicates "nested subsystems" which aren't a thing any more. But some aspects of this are still tested in the Python parser, and we want those tests to continue to pass under the Rust parser. This PR also changes the return value of get_passthrough_args to one that turns out to be more useful in practice, but which wasn't worth an independent PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.