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

Revert "Option required flag" #18802

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Revert "Option required flag" #18802

merged 1 commit into from
Apr 23, 2023

Conversation

kaos
Copy link
Member

@kaos kaos commented Apr 23, 2023

Reverts #18780.

As discussed in #18792 a less invasive approach is to indicate an options requiredness at runtime when looking up the value rather than as a static declaration enforced at parse time.

@kaos kaos added the category:internal CI, fixes for not-yet-released features, etc. label Apr 23, 2023
@kaos kaos requested a review from benjyw April 23, 2023 14:04
@benjyw
Copy link
Contributor

benjyw commented Apr 23, 2023

To clarify my comment on #18792 , I think a static option enforced at parse time is fine, just that we shouldn't enforce it at _get_underlying_value lookup time, because that is very invasive. Instead we can do it as an extra step at parse time.

@kaos
Copy link
Member Author

kaos commented Apr 23, 2023

To clarify my comment on #18792 , I think a static option enforced at parse time is fine, just that we shouldn't enforce it at _get_underlying_value lookup time, because that is very invasive. Instead we can do it as an extra step at parse time.

The problem with that is that if you have some required options on a GoalSubsystem that are "ad-hoc" in nature (e.g. they only make sense to provide as CLI flags along with running the goal, as with pants paths --from=.. --to=..) we don't want to err if they're missing when you are not running said goal.

@kaos
Copy link
Member Author

kaos commented Apr 23, 2023

Still, I think it's preferable to back this out and redo it, so we can cut a clean 2.17 dev release.

@kaos kaos merged commit 091b1c0 into main Apr 23, 2023
@kaos kaos deleted the revert-18780-option-required-flag branch April 23, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants