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

spago install --ensure-ranges should be the default for solver projects #1318

Open
natefaubion opened this issue Jan 26, 2025 · 2 comments
Open

Comments

@natefaubion
Copy link

spago install never adds version ranges to spago.yaml. For package-set based projects this isn't a big deal (and is even desirable), but for solver based projects this is confusing. When maintaining a solver project you have to remember to add --ensure-ranges to get a sensible spago.yaml. We should do this automatically.

@f-f
Copy link
Member

f-f commented Jan 26, 2025

Agreed. I would even go as far as adding it by default to all projects - we currently ignore ranges for package set builds anyways (see #1313), and even after we fix that we'll only issue warnings.

@natefaubion
Copy link
Author

natefaubion commented Jan 26, 2025

I'm a little unclear as to why you'd want that for package sets by default.

  • Generally I don't care about specific versions when using a package set.
  • If the ranges are persisted, and a package set bumps versions outside the ranges, what happens?
  • Does a package set upgrade automatically bump versions?
  • Can a package set upgrade fail if it would result in versions outside of the declared ranges?

It would be kind of terrible to persist ranges, and then get a bunch of warnings on upgrades, and then need a followup --ensure-ranges to fix it. But also, if version ranges are explicit, I feel like anything that breaks them should come with an "are you sure you want to do this?" confirmation.

It seems like adding this to package set repos might really complicate it without a clear intention for all the interactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants