Open phadej opened 5 years ago
Fwiw, the current pragmatic ||
-style constraint were a stop-gap solution towards the proper solution that #3502 aims to (I wasn't able to quickly locate the more specific issue/commit that got us the current ||
-style constraints to make it possible to generate freeze files at all in the presence of qualified goals, which by design do not guarantee there to exist globally single-versioned plans)
Won't generating something like
hashable ==1.3.0.0,
any.hashable ==1.2.7.0 || ==1.3.0.0,
be already more precise?
sure, that'd be an incremental improvement within the current inadequate constraint-language; but I was trying to point out that we have a far bigger problem at hand... you'd just be improving the current stop-gap solution ;-)
Nothing wrong with making the stop-gap solution better.
More than one version of the same package appears in the freeze file when you pick a separate version for a custom-setup
dependency because cabal freeze qualifies all packages with any
... therefore we can't differentiate between the version for the top-level vs setup dependency thus we simply allow both, which is very bad.
Cabal freeze should not use any
qualifier for anything in the freeze file: #9799
Describe the bug
After
v2-freeze
I see things likein
cabal.project.freeze
.To Reproduce
I'm able to reproduce this with a current
master
ofpostgresql-simple
commitd0fcf2800b184f095c4aac56db4a8a3ed1a8a829
I think that any package with custom-setup packages in dependencies, and suitable situation (see below) can trigger this:
Expected behavior
I'd expect only
thisVersion
, i.e.== x.y.z.w.
version ranges to exist incabal.project.freeze
. Technically, I'd expect that not being possible at all (i.e. freeze file representation would useVersion
, notVersionRange
, and if independent goals require it, then use proper goal qualification, ifany
would be||
-ed range)System informataion
Additional context
The problem is because independent goals are merged together, see
Cabal
dependencies in custom-setup are merged with "main" stuff. Which makes freeze file more like "gelly".