Skip to content

Conversation

@owlstronaut
Copy link
Contributor

@owlstronaut owlstronaut commented Apr 17, 2025

fixes #8195

There isn't anything warning users about combining different save types together, but they are mutually exclusive, and the last one wins. This adds exclusive to the definitions for the types that won't work together.

@owlstronaut owlstronaut force-pushed the owlstronaut/test-opts branch from e23386e to 17efbc3 Compare April 18, 2025 14:48
@wraithgar
Copy link
Member

This needs to be done outside the context of argv parsing. Consider a user with multiple save declarations in their ini files, it's the same situation.

We have an exclusive attribute that we added for provenance to prevent users from doing --provenance and --provenance-file. I wonder if it is as easy as adding that attribute to each of these so they are exclusive w/ each other?

@owlstronaut
Copy link
Contributor Author

This needs to be done outside the context of argv parsing. Consider a user with multiple save declarations in their ini files, it's the same situation.

We have an exclusive attribute that we added for provenance to prevent users from doing --provenance and --provenance-file. I wonder if it is as easy as adding that attribute to each of these so they are exclusive w/ each other?

@wraithgar

We can certainly do that! Are we okay that that will break anyone that has things currently using those together - depending on the bug behavior? I was trying to warn the user without a breaking change

@wraithgar
Copy link
Member

Yes, if they're doing it now they're already broken but don't know it.

@owlstronaut owlstronaut force-pushed the owlstronaut/test-opts branch 2 times, most recently from c69cae8 to 38a0a65 Compare April 21, 2025 15:13
@owlstronaut owlstronaut force-pushed the owlstronaut/test-opts branch from 38a0a65 to b9e767d Compare April 21, 2025 15:14
@owlstronaut owlstronaut marked this pull request as ready for review April 21, 2025 15:24
@owlstronaut owlstronaut requested a review from a team as a code owner April 21, 2025 15:24
@owlstronaut owlstronaut changed the title fix: make --save and --save-dev more clear fix(config): use exclusive for save types Apr 21, 2025
@owlstronaut owlstronaut merged commit ed1a28e into latest Apr 21, 2025
18 checks passed
@owlstronaut owlstronaut deleted the owlstronaut/test-opts branch April 21, 2025 15:47
@github-actions github-actions bot mentioned this pull request Apr 21, 2025
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.

[BUG] --save-dev and --save-optional are not mutually exclusive

2 participants