Closed philderbeast closed 8 months ago
[!WARNING] I got a ghc panic with
ghc-8.4.3
buildingCabal-syntax
$ cabal build all --enable-tests --enable-benchmark
...
Failed to build Cabal-syntax-3.10.2.0.
...
[ 29 of 137] Compiling Distribution.CabalSpecVersion ( src/Distribution/CabalSpecVersion.hs, dist/build/Distribution/CabalSpecVersion.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.3 for x86_64-unknown-linux):
Prelude.!!: index too large
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Error: cabal: Failed to build Cabal-syntax-3.10.2.0 (which is required by
test:TestSuite from hackage-security-0.6.2.4, exe:example-client from
example-client-0.1.0.0 and others). See the build log above for details.
Yeah, that's the same issue as https://gitlab.haskell.org/ghc/ghc/-/issues/21905 and probably similar to https://gitlab.haskell.org/ghc/ghc/-/issues/15436, fixed in GHC 8.4.4, which never happened.
Thanks @Bodigrim. No worries then as we're targeting ghc >= 8.4.4
. I didn't go with base >=4.11.1
because that doesn't distinguish between GHC versions {8.4.2, 8.4.3, 8.4.4}
and, from the 8.4.2 release notes, base doesn't look much different to base-4.11.0.0
.
@andreasabel, I used your fork of haskell-ci
.
I saw the TODO and added precompute-fileinfo
to the project. I hope that is alright.
I saw the TODO and added
precompute-fileinfo
to the project. I hope that is alright.
As far as I can see that's fine. What an impressive cleanup, BTW. Thanks a lot!
Atm cabal check
seems to fail causing Haskell CI to fail...
@philderbeast wrote:
I cleaned up some unused
{-# LANGUAGE CPP #-}
pragmas but note that some of the packages set this extension indefault-extensions
orother-extensions
:
If none of the files of a package uses {-# LANGUAGE CPP #-}
, it can be removed from other-extensions
...
Atm
cabal check
seems to fail causing Haskell CI to fail...
I wonder why this wasn't failing before this pull request as cabal check
fails on the master branch when cabal >= 3.10
?
$ pwd
~/.../hackage-security/hackage-security
$ cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
$ cabal check
No errors or warnings could be found in the package.
$ cabal --version
cabal-install version 3.10.1.0
compiled using version 3.10.1.0 of the Cabal library
$ cabal check
Warning: These warnings may cause trouble when distributing the package:
Warning: These packages miss upper bounds:
- ghc-prim
- text
Please add them, using `cabal gen-bounds` for suggestions. For more
information see: https://pvp.haskell.org/
$ cabal --version
cabal-install version 3.10.2.0
compiled using version 3.10.2.1 of the Cabal library
$ cabal check
Warning: These warnings may cause trouble when distributing the package:
Warning: These packages miss upper bounds:
- ghc-prim
Please add them, using `cabal gen-bounds` for suggestions. For more
information see: https://pvp.haskell.org/
$ cabal --version
cabal-install version 3.10.2.1
compiled using version 3.10.2.1 of the Cabal library
$ cabal check
Warning: These warnings may cause trouble when distributing the package:
Warning: These packages miss upper bounds:
- ghc-prim
Please add them, using `cabal gen-bounds` for suggestions. For more
information see: https://pvp.haskell.org/
If none of the files of a package uses
{-# LANGUAGE CPP #-}
, it can be removed fromother-extensions
...
I've never previously bothered with other-extensions
with my own packages. Maintaining this list would be quite manual, wouldn't it or is there tooling to help with that?
I haven't heard of any tooling.
I've bumped the lower bounds to match the either the ghc-8.4.4 release notes or cabal gen-bounds
.
I've also removed a couple of if impl(ghc >= 8.2)
conditionals in .cabal
files.
Excellent work!
However, I think this refactoring should preserve the "impossibles" of the original code, i.e., crash when the original code crashed.
@philderbeast: ready for merge?
@Mikolaj, I'll first setup the cabal CI to do a run through with source-repository-package
back to this change, as you suggested in https://github.com/haskell/hackage-security/issues/303#issuecomment-1902250573. While I could do this locally, I feel the CI version is a more complete check.
@philderbeast: ready for merge?
Yes please @Mikolaj.
@Mikolaj The banner "pr: squash" is up but the individual commits were merged. Was this intentional? If yes, please change the banner to "pr: preserve commits".
My fault, I haven't seen the banner. Will do better next time. :)
Actually, since this wasn't intentional, let me preserve the documentation of the mistake.
No problem.
I guess we wait for Cabal-3.12
before we release, what do you think?
Fixes #303. I bumped base to
>=4.11
, matchedghc-8.4.4
included packages' lower bounds, and fixed warnings includingcabal check
warnings except for the example.This is the change to
cabal.project
(or the contents ofcabal.project.local
if you prefer) I used for testing:Even though I much prefer
-XStandaloneKindSignatures
, we can't use that untilghc >= 8.10
.I cleaned up some unused
{-# LANGUAGE CPP #-}
pragmas but note that some of the packages set this extension indefault-extensions
orother-extensions
:I've not tested this with cabal yet.