haskell / hackage-security

Hackage security framework based on TUF (The Update Framework)
http://hackage.haskell.org/package/hackage-security
56 stars 48 forks source link

Support GHC 9.10 and template-haskell-2.22 #316

Closed Bodigrim closed 3 months ago

Bodigrim commented 4 months ago

From Cabal CI logs:

Run cabal install --ignore-project hackage-repo-tool
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.10.3.0 supports
'ghc' version < 9.10): /home/runner/.ghcup/bin/ghc is version 9.10.1
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.10.3.0 supports
'ghc' version < 9.10): /home/runner/.ghcup/bin/ghc is version 9.10.1
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: hackage-repo-tool-0.1.1.4 (user goal)
[__1] trying: hackage-security-0.6.2.6 (dependency of hackage-repo-tool)
[__2] next goal: template-haskell (dependency of hackage-security)
[__2] rejecting: template-haskell-2.22.0.0/installed-0c48 (conflict:
hackage-security => template-haskell>=2.13 && <2.22)
[__2] skipping: template-haskell-2.22.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '>=2.13 && <2.22'
from 'hackage-security')
[__2] rejecting: template-haskell-2.21.0.0, template-haskell-2.20.0.0,
template-haskell-2.19.0.0, template-haskell-2.18.0.0,
template-haskell-2.17.0.0, template-haskell-2.16.0.0,
template-haskell-2.15.0.0, template-haskell-2.14.0.0,
template-haskell-2.13.0.0, template-haskell-2.12.0.0,
template-haskell-2.11.1.0, template-haskell-2.11.0.0,
template-haskell-2.10.0.0, template-haskell-2.9.0.0, template-haskell-2.8.0.0,
template-haskell-2.7.0.0, template-haskell-2.6.0.0, template-haskell-2.5.0.0,
template-haskell-2.4.0.1, template-haskell-2.4.0.0, template-haskell-2.3.0.1,
template-haskell-2.3.0.0, template-haskell-2.2.0.0 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: hackage-security, template-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: template-haskell, pretty, base,
hackage-security, containers, hackage-repo-tool
Try running with --minimize-conflict-set to improve the error message.

(Surprisingly Cabal CI carries on as if nothing has happened. @Mikolaj is it something to look at?)

Mikolaj commented 4 months ago

Huh, yes, thank you. Either the hackage-repo-tool is not needed any more or the rest of CI is skipping tests that would require it. Either case is bad and this should stop a CI run, which would alert us to the problem.

geekosaur commented 4 months ago

There's a comment somewhere in (IIRC) validate.sh saying that it's optional and tests that require it will be skipped.

geekosaur commented 4 months ago

It also says that hackage-repo-tool is known to be fiddly to get installed properly.

geekosaur commented 4 months ago

Confirmed, it's deliberate: https://github.com/haskell/cabal/blob/master/.github/workflows/validate.yml#L123-L130

TL;DR: "We want to keep this in the loop but we don't want to fail if hackage-repo-tool breaks or fails to support a newer GHC version."

Mikolaj commented 4 months ago

Oh, phew, so it's not high priority after all. Downgrading. Thank you.

mpilgrem commented 3 months ago

I've been trying to build Stack with GHC 9.10.1. It compiles with hackage-security-0.6.2.6 (which ships with GHC 9.10.1) if that package's upper bound on dependency template-haskell < 2.22 is ignored (GHC 9.10.1 ships with template-haskell-2.22.0.0).

Mikolaj commented 3 months ago

@mpilgrem: thank you for the report. @andreasabel: shall we relax the bound on Hackage (and in the repo)?

Mikolaj commented 3 months ago

@geekosaur: which version bumps exactly in hackage-security do you need for cabal 3.12.1.0? Only the template-haskell bump or anything more?

geekosaur commented 3 months ago

I've been advised that, since we don't actually care about bootstraps for branches other than master, I should move on without it. That said, I bodged a --allow-newer=hackage-security:template-haskell into the command that generates the initial build plan and it succeeded for 9.10.1, so that should be it.

Bodigrim commented 3 months ago

@Mikolaj could you pleae go ahead and make a revision? Current situation is not the end of the world, but very annoying.

Mikolaj commented 3 months ago

Yes, sure. I did

Changed the library component's library dependency on 'template-haskell' from

>=2.13 && <2.22

to

>=2.13 && <2.23

for

https://hackage.haskell.org/package/hackage-security-0.6.2.6

Is that it? If so, let's please not close this ticket until this is reflected in the repo (it's not, currently).

Bodigrim commented 3 months ago

Looks good, thanks.

Mikolaj commented 3 months ago

@andreasabel: oh, cool, thank you.