Add --set-exit-if-changed (or similar) option to pub downgrade
#4372
Labels
type-enhancement
A request for a change that isn't a bug
pub downgrade
#4372
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.The text was updated successfully, but these errors were encountered: