Repository navigation
Bump the lower bound on base? #303
Description
Activity
There's a fair bit of
CPPin this project already.$ grep -rw --include=\*.hs . -e '#if' ./example-client/src/Prelude.hs:#if !MIN_VERSION_base(4,8,0) ./example-client/src/Prelude.hs:#if MIN_VERSION_base(4,8,0) ./example-client/src/Prelude.hs:#if MIN_VERSION_base(4,6,0) ./hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs:#if MIN_VERSION_directory(1,2,0) ./hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs:#if MIN_VERSION_directory(1,2,0) ./hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs:#if MIN_VERSION_base(4,8,0) ./hackage-repo-tool/src/Prelude.hs:#if !MIN_VERSION_base(4,8,0) ./hackage-repo-tool/src/Prelude.hs:#if MIN_VERSION_base(4,8,0) ./hackage-repo-tool/src/Prelude.hs:#if MIN_VERSION_base(4,6,0) ./hackage-repo-tool/src/Main.hs:#if !MIN_VERSION_base(4,8,0) ./hackage-security-http-client/src/Hackage/Security/Client/Repository/HttpLib/HttpClient.hs:#if MIN_VERSION_http_client(0,5,0) ./hackage-security/src/MyPrelude.hs:#if !MIN_VERSION_base(4,8,0) ./hackage-security/src/MyPrelude.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/MyPrelude.hs:#if MIN_VERSION_base(4,6,0) ./hackage-security/src/Text/JSON/Canonical.hs:#if !(MIN_VERSION_base(4,7,0)) ./hackage-security/src/Text/JSON/Canonical.hs:#if MIN_VERSION_base(4,7,0) ./hackage-security/src/Text/JSON/Canonical.hs:#if MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Key.hs:#if !MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Key.hs:#if MIN_VERSION_ed25519(0,0,4) ./hackage-security/src/Hackage/Security/Key.hs:#if MIN_VERSION_ed25519(0,0,4) ./hackage-security/src/Hackage/Security/Key.hs:#if !MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Trusted.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Trusted/TCB.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Trusted/TCB.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Trusted/TCB.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/Hackage/Security/Client.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Client.hs:#if __GLASGOW_HASKELL__ < 800 ./hackage-security/src/Hackage/Security/Client.hs:#if __GLASGOW_HASKELL__ < 800 ./hackage-security/src/Hackage/Security/Client.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/Hackage/Security/TUF/Patterns.hs:#if __GLASGOW_HASKELL__ >= 800 ./hackage-security/src/Hackage/Security/TUF/Patterns.hs:#if __GLASGOW_HASKELL__ >= 800 ./hackage-security/src/Hackage/Security/JSON.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/Hackage/Security/Client/Repository/Remote.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/Hackage/Security/Client/Repository.hs:#if MIN_VERSION_base(4,8,0) ./hackage-security/src/Hackage/Security/Util/IO.hs:#if MIN_VERSION_base(4,11,0) ./hackage-security/src/Hackage/Security/Util/IO.hs:#if MIN_VERSION_base(4,11,0) ./hackage-security/src/Hackage/Security/Util/Path.hs:#if MIN_VERSION_directory(1,2,0) ./hackage-security/src/Hackage/Security/Util/Path.hs:#if MIN_VERSION_directory(1,2,2) ./hackage-security/src/Hackage/Security/Util/Path.hs:#if MIN_VERSION_directory(1,2,0) ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if __GLASGOW_HASKELL__ >= 800 ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if __GLASGOW_HASKELL__ >= 708 ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if __GLASGOW_HASKELL__ >= 708 ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if __GLASGOW_HASKELL__ >= 708 ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if MIN_VERSION_base(4, 7, 0) ./hackage-security/src/Hackage/Security/Util/Checked.hs:#if __GLASGOW_HASKELL__ >= 708 ./hackage-security/src/Hackage/Security/Util/Some.hs:#if !MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Util/Some.hs:#if MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Util/Some.hs:#if MIN_VERSION_base(4,7,0) ./hackage-security/src/Hackage/Security/Util/JSON.hs:#if __GLASGOW_HASKELL__ < 710 ./hackage-security/src/Hackage/Security/Util/JSON.hs:#if !MIN_VERSION_time(1,5,0) ./hackage-security/src/Hackage/Security/Util/JSON.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Util/JSON.hs:#if __GLASGOW_HASKELL__ >= 710 ./hackage-security/src/Hackage/Security/Util/JSON.hs:#if !MIN_VERSION_time(1,5,0) ./hackage-security/tests/TestSuite.hs:#if MIN_VERSION_Cabal(2,0,0) ./hackage-security/tests/TestSuite.hs:#if !MIN_VERSION_Cabal(2,0,0) ./hackage-security/tests/TestSuite/JSON.hs:#if MIN_VERSION_aeson(2,0,0) ./hackage-security/tests/TestSuite/JSON.hs:#if MIN_VERSION_aeson(2,0,0) ./hackage-root-tool/Main.hs:#if !MIN_VERSION_base(4,8,0) ./hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs:#if MIN_VERSION_base(4,8,0)Yes, I think it's a good idea to get base bounds to match Cabal-the-library's, given that cabal's bounds are already quite generous and anything that uses hackage-security most probably uses Cabal as well. I hope GHC versions in CI already do match (if not, we can narrow them further, I think).
After enforcing GHC >= 8 in
there is much less
#if.I routinely drop GHC 7 now in all my projects, that's a no-brainer.
Dropping GHC < 8.6 requires probably a bit more care, as it is not dead-clear that the Haskell community is abandoning these GHCs already.
I seem like pantry, one of our users, still builds with GHC 8.2 (base-4.10).Reacted by Mikolaj KonarskiI seem like pantry, one of our users, still builds with GHC 8.2 (base-4.10).
Actually, only on paper. In fact, it has no build plans for GHC < 8.8:
The only other user is Cabal, so going to GHC 8.6 seems fine here after all.
Reacted by Mikolaj KonarskiThe oldest GHC that cabal CI builds cabal with is 8.4 from what I see.
Reacted by Phil de Joux@Mikolaj for testing this against cabal, would you expect that I'd take cabal/.github/workflows/validate.yml, and manually run the steps locally?
To pick up my changes to
hackage-securityfor the version bump for this test, I plan to add asource-repository-packagebut wouldn't commit this.@philderbeast: I'd imagine just building all and the running the cabal-testsuite (with the newly built binary in
--with-cabal!) should be plenty, as described here: https://github.com/haskell/cabal/blob/master/cabal-testsuite/README.md. Or, to test some more, you may want to run thevalidate.shscript.An alternative is to open a throw-away PR in cabal repo (then close it and keep it as documentation) and tweak it so that CI does what you want. And here's yet another tool that may be helpful: haskell/cabal#9561
BTW, would you also recommend a revision of the bound on Hackage? Or just wait for a new release (@andreasabel can predict better than myself on what timescale the new release is likely to emerge).
- added a commit that references this issue
on Mar 18, 2024 If I am not mistaken,
masteris releasable, so we can ship hackage-security/v0.6.2.5 at any time.Reacted by Mikolaj Konarski and Phil de JouxReacted by ffaf1Yes, please do, that will make @ffaf1's life easier.
Reacted by ffaf1Ok! I'll open a PR for the release.
Could we bump the lower bound on base?
hackage-security/hackage-security/hackage-security.cabal
Lines 114 to 115 in b306678
hackage-security/hackage-security/hackage-security.cabal
Lines 33 to 45 in b306678
I came here to see if I could do something about the noisy
-Wstar-is-typewarnings fromhackage-securitywhen compiling cabal but saw that I couldn't do that withoutCPPconditionals given that-Wstar-is-typewas introduced inghc-8.6and we have a lower bound on base of4.8that isghc-7.10.1.