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

Remove the option inheritance and recursive options features. #12519

Merged
merged 1 commit into from
Aug 7, 2021

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Aug 6, 2021

This is not needed in v2, and simplifies the options handling code and tests quite a bit.
It also simplifies things for end users, who don't have to understand these concepts any more.
This should also improve invalidation, since scopes don't all inherit global scope options any more.

[ci skip-rust]

[ci skip-build-wheels]

@benjyw benjyw force-pushed the options_inheritance2 branch from c324dc5 to 41309bb Compare August 6, 2021 23:32
@benjyw benjyw marked this pull request as draft August 6, 2021 23:33
@benjyw benjyw force-pushed the options_inheritance2 branch from 41309bb to cea5a1f Compare August 7, 2021 01:25
@benjyw benjyw requested review from stuhood and Eric-Arellano August 7, 2021 01:25
@benjyw benjyw marked this pull request as ready for review August 7, 2021 01:25
@benjyw
Copy link
Contributor Author

benjyw commented Aug 7, 2021

A follow-up change may clean up, simplify or even remove ParserHierarchy, but this PR is big enough already.

scope: str,
inherit_from_enclosing_scope: bool = True,
) -> OptionValueContainer:
def for_scope(self, scope: str, check_deprecations: bool = True) -> OptionValueContainer:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously we piggybacked off inherit_from_enclosing_scope as a heuristic to avoid checking deprecations prematurely. Now we're explicit about this.

Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Nice! Great to see this go.

@benjyw benjyw merged commit 2de9e71 into pantsbuild:main Aug 7, 2021
@stuhood stuhood mentioned this pull request Aug 14, 2021
@benjyw benjyw deleted the options_inheritance2 branch September 30, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants