commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 842 forks source link

`stack-2.15.5` does not `cabal install` with GHC 9.8.2 #6549

Closed sol closed 6 months ago

sol commented 6 months ago

Steps to reproduce

$ cabal update && cabal install
...
src/Codec/Archive/Tar/Utf8.hs:34:27: error: [GHC-88464]
    Variable not in scope: entryTarPath :: Entry -> TarPath
    Suggested fixes:
      • Perhaps use one of these:
          record field of Entry ‘Tar.entryTarPath’ (imported from Codec.Archive.Tar.Entry),
          ‘Tar.entryPath’ (imported from Codec.Archive.Tar.Entry),
          ‘entryPath’ (line 34)
      • Add ‘entryTarPath’ to the import list in the import of
        ‘Codec.Archive.Tar.Entry’
        (at src/Codec/Archive/Tar/Utf8.hs:13:1-80).
   |
34 | entryPath = fromTarPath . entryTarPath
   |                           ^^^^^^^^^^^^

src/Codec/Archive/Tar/Utf8.hs:78:44: error: [GHC-83865]
    • Couldn't match type ‘[Char]’ with ‘TarPath’
      Expected: GenEntries
                  TarPath
                  Tar.LinkTarget
                  (Either
                     (Either e DecodeLongNamesError)
                     tar-0.6.2.0:tar-internal:Codec.Archive.Tar.Check.Internal.FileNameError)
        Actual: GenEntries
                  FilePath
                  FilePath
                  (Either
                     (Either e DecodeLongNamesError)
                     tar-0.6.2.0:tar-internal:Codec.Archive.Tar.Check.Internal.FileNameError)
    • In the second argument of ‘unpackEntries’, namely
        ‘(checkSecurity entries)’
      In the first argument of ‘(>>=)’, namely
        ‘unpackEntries [] (checkSecurity entries)’
      In the expression:
        unpackEntries [] (checkSecurity entries) >>= emulateLinks
   |
78 | unpack baseDir entries = unpackEntries [] (checkSecurity entries)
   |                                            ^^^^^^^^^^^^^^^^^^^^^

src/Codec/Archive/Tar/Utf8.hs:97:17: error: [GHC-88464]
    Variable not in scope:
      entryTime :: GenEntry TarPath Tar.LinkTarget -> t
    Suggested fixes:
      • Perhaps use record field of Entry ‘Tar.entryTime’ (imported from Codec.Archive.Tar.Entry)
      • Add ‘entryTime’ to the import list in the import of
        ‘Codec.Archive.Tar.Entry’
        (at src/Codec/Archive/Tar/Utf8.hs:13:1-80).
   |
97 |         mtime = entryTime entry
   |                 ^^^^^^^^^
...

Works fine with ghc-9.8.1. I haven't further investigated.

Platform

x86_64 Linux

mpilgrem commented 6 months ago

@sol, noted - but stack-2.15.5 is intended to be built only with GHC 9.6.4. See https://docs.haskellstack.org/en/stable/CONTRIBUTING/#backwards-compatability, its stack.yaml and cabal.project (provided for convenience). Once there is an LTS snapshot for GHC 9.8.x, I'll move Stack on to that version of GHC.

mpilgrem commented 6 months ago

I think this is because stack-2.15.5 is built against tar-0.5.1.1 (from LTS 22.7) and tar-0.6.0.0 introduced some breaking changes. As it will help users of Cabal, I could introduce an upper bound on the tar dependency.

mpilgrem commented 6 months ago

Also made package revisions for recent versions of stack on Hackage.

sol commented 6 months ago

@mpilgrem thanks.