haskell / happy

The Happy parser generator for Haskell
Other
276 stars 85 forks source link

Should `happy-1.21.0` be revised to become unbuildable? #215

Closed andreasabel closed 2 years ago

andreasabel commented 2 years ago

See image in https://github.com/simonmar/happy/issues/214#issue-1051374134: happy-1.21.0 is listed on matrix.hackage as FAIL(pkg) and I read somewhere that it is deprecated. Should it be revised to actually be unbuildable (e.g. by setting base < 0)? This would switch it to OK(no-ip).

Ericson2314 commented 2 years ago

Could we revise it to make the bootstrap flag on by default? If so, that should also make it succeed.

simonmichael commented 2 years ago

I'd welcome either of these. The release of happy 1.21 broke my CI, and it wasn't too easy to discover the cause.

Ericson2314 commented 2 years ago

Errors

Cannot change the default of a manual flag

No dice

int-index commented 2 years ago

The bootstrap build does not support all features, so that might have broken some builds as well. What about the base < 0 trick, would it work?

My understanding is that cabal won’t pick happy-1.21.0 anyway because it’s marked as deprecated, and the remaining build problems are from stack users.

andreasabel commented 2 years ago

What about the base < 0 trick, would it work?

Yes, this would make the happy-1.21.0 unbuildable, and prune it from the cabal constraint solving process. This was my suggestion. Seems like changing the flag value would warrant a release of 1.21.0.1 or 1.21.1.

int-index commented 2 years ago

Yes, this would make the happy-1.21.0 unbuildable, and prune it from the cabal constraint solving process.

But it’s marked as deprecated, shouldn’t it already be pruned?

andreasabel commented 2 years ago

There are exceptions:

If all the available versions of a package are non-preferred or deprecated, cabal-install will treat this the same as if none of them are.

Btw, it does install fine:

$ cabal install happy-1.21.0
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
 - happy-1.21.0 (exe:happy) (requires build)
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
Building executable 'happy' for happy-1.21.0..
[ 1 of 23] Compiling AbsSyn      
((SUCCEEDS))
phadej commented 2 years ago

deprecation is indeed a preference, solver can still pick it if it's forced to. base <0 would be a hard (unsatisfiable) constraint.

TL;DR deprecations on Hackage do very little. IMO not worth using at all (There are exceptions, but they could be pruned by being able to do a bit more precise revisions or situations like in https://github.com/haskell-infra/hackage-trustees/issues/213).

int-index commented 2 years ago

OK, I revised it to specify base <0

andreasabel commented 2 years ago

See https://hackage.haskell.org/package/happy-1.21.0/revisions/