-
Notifications
You must be signed in to change notification settings - Fork 696
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
new-freeze does not freeze dependencies of executables #4832
Comments
@lspitzner That's a long-standing issue; we've had long conversations about this; most recent comment about this I can recall is #3502 (comment) by @grayjay |
It looks like new-freeze currently doesn't add any qualifiers to the constraints in the freeze file (CmdFreeze.hs), so it only constrains the top-level dependencies. It should probably at least use the |
@grayjay but if you simply add |
I think that new-freeze already took the union of all of the versions in the install plan when calculating the constraints, to work around the lack of qualified constraints before they were added. So this issue is probably a regression from when we made constraints like |
I think I saw |
Apply 'any' qualifier to new-freeze constraints (fixes #4832).
Yes |
@grayjay Can it lead to situations where we read in a freeze file, but the solver chooses a different install plan than the one that was frozen? Do we have a ticket for fixing that? |
@23Skidoo Yes, it's possible for the solver to choose a different version for a package if anything changes, such as solver flags or Hackage revisions, or the user edits other constraints in the file. #3502 covers using qualified constraints in the freeze file. We probably also need component based solving (#4087) before we can expose a stable format for qualified constraints for build tools. |
@grayjay Thanks! |
And even though some dependency is frozen, it will be rebuilt because an executable it depends on is updated. In the worst case, all your frozen dependencies will be re-built after a
cabal update
because somethink like "happy" has a new version.cabal-install-2.0.0.0
. The observed behaviour is consistent independent of using freeze file or project fileconstraints
field.Reproduction: Init empty cabal lib project, add dependency
gkt3
, try to restrict version ofhappy
(an executable dependency) to something non-latest.The text was updated successfully, but these errors were encountered: