You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mostly like the idea of refreezing by rerunning cabal freeze and having it ignore [cabal.config]. But freezing something that is already frozen and having it change seems surprising.
It appears that as currently implemented, cabal freeze ignores any constraints set both in the local cabal.config file, and in the global ~/.cabal/config file. Re-running cabal freeze with no packages installed results in a new set of constraints, matching the newest available versions of all dependencies.
cabal freeze also does not support the --constraint= command-line option, available for cabal install.
In order to improve the workflow for upgrading dependencies, I wanted to add two options to Halcyon, --ignore-constraints and --ignore-all-constraints, corresponding to the --ignore-frozen and --ignore-all-frozen options proposed in #1519 (comment). Unfortunately, with no apparent way to specify constraints for cabal freeze, I can only support --ignore-all-constraints.
Additionally, there is no way to help users who have included partial cabal.config files with their applications. If cabal freeze did not ignore constraints, this could be detected and the user could be warned.
@mietek on #1519 you asked me to confirm if cabal freeze ignores the constraints in cabal.config. It does.
If I recall correctly that was the majority opinion of what the correct / initial implementation should be. I'd also like to see cabal freeze pay attention to the constraints and gain some options to ignore all or selected constraints.
The --constraint= option for cabal freeze seems like a good idea too. Though I've not personally had any use for that.
@23Skidoo, @tibbe would changing the default behaviour for cabal freeze to stop ignore the constraints in cabal.config, and adding --ignore-constraints and --ignore-all-constraints options be acceptable to you?
Halcyon supports ignoring all existing constraints with the HALCYON_IGNORE_ALL_CONSTRAINTS option, as this does not require modifications to cabal-install.
@hvr@xich Having a --constraint= option for cabal freeze could also help work around the problem of old package versions not declaring version constraints upper bounds.
For example, because Scotty did not declare upper bounds for scotty-0.5.0, and has not released a version supporting monad-control-1.0.* yet, current install plans will ignore the newest available scotty-0.9.0, and select scotty-0.5.0, which no longer compiles successfully.
As freeze is the simplest way to ask Cabal “what do you need installed for this particular package” without installing anything, being able to say freeze --constraint=scotty-0.9.0 would be a big help here.
(I believe constraints of the form scotty-0.9.0 should be accepted as equivalent to scotty ==0.9.0.)
new-build should improve the situation, since new-freeze takes a --constraint option and uses the constraints from an existing cabal.project.freeze file. I don't think it supports anything like --ignore-frozen or --ignore-all-frozen, though.
Activity
benarmston commentedon Dec 10, 2014
@mietek on #1519 you asked me to confirm if
cabal freezeignores the constraints incabal.config. It does.If I recall correctly that was the majority opinion of what the correct / initial implementation should be. I'd also like to see
cabal freezepay attention to the constraints and gain some options to ignore all or selected constraints.benarmston commentedon Dec 10, 2014
The
--constraint=option forcabal freezeseems like a good idea too. Though I've not personally had any use for that.@23Skidoo, @tibbe would changing the default behaviour for
cabal freezeto stop ignore the constraints incabal.config, and adding--ignore-constraintsand--ignore-all-constraintsoptions be acceptable to you?mietek commentedon Dec 10, 2014
@benarmston: Thanks for the quick reply. Indeed, I read your proposed use cases carefully, and I am in favour of the design.
mietek commentedon Dec 12, 2014
Halcyon supports ignoring all existing constraints with the
HALCYON_IGNORE_ALL_CONSTRAINTSoption, as this does not require modifications to cabal-install.mietek commentedon Dec 18, 2014
@hvr @xich Having a
--constraint=option forcabal freezecould also help work around the problem of old package versions not declaring version constraints upper bounds.For example, because Scotty did not declare upper bounds for
scotty-0.5.0, and has not released a version supportingmonad-control-1.0.*yet, current install plans will ignore the newest availablescotty-0.9.0, and selectscotty-0.5.0, which no longer compiles successfully.As
freezeis the simplest way to ask Cabal “what do you need installed for this particular package” without installing anything, being able to sayfreeze --constraint=scotty-0.9.0would be a big help here.(I believe constraints of the form
scotty-0.9.0should be accepted as equivalent toscotty ==0.9.0.)sebright commentedon Jun 17, 2018
#2519 describes another use case for running
cabal freezewith an existing freeze file.sebright commentedon Jun 17, 2018
new-build should improve the situation, since new-freeze takes a
--constraintoption and uses the constraints from an existingcabal.project.freezefile. I don't think it supports anything like--ignore-frozenor--ignore-all-frozen, though.mietek commentedon May 23, 2019
Closing as no longer relevant.