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

Add --set-exit-if-changed (or similar) option to pub downgrade #4372

Open
jakemac53 opened this issue Sep 4, 2024 · 0 comments
Open

Add --set-exit-if-changed (or similar) option to pub downgrade #4372

jakemac53 opened this issue Sep 4, 2024 · 0 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@jakemac53
Copy link
Contributor

Use case

You want to validate your minimum constraints are valid across all your package dependencies on CI.

Today, you can run a pub downgrade but it does not guarantee that you get the actual minimum versions specified there.

You can also pass --tighten which will update the min constraints to whatever could actually be solved for (and thus tested).

However, these both always give a zero exit code as long as there was a valid version solve. If you properly want to validate your package (and its constraints), you want to run something on CI which will give a non-zero exit code if the constraints need to be updated to reflect what can actually be tested.

The dart format command has a --set-exit-if-changed flag which is commonly used for this task, and I propose something similar here.

@sigurdm sigurdm added the type-enhancement A request for a change that isn't a bug label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants