Skip to content

current stack fails to build with Cabal-3.4 #5670

Closed
@juhp

Description

@juhp

General summary/comments (optional)

Can't build stack itself with ghc-9.0 (or Stackage Nightly).

Steps to reproduce

stack --resolver nightly build

(the next nightly after 2022-01-14 should contain pantry, since hackage-security and ed25519 got unlocked for ghc-9.0)

Actual

$ git diff
diff --git a/stack.yaml b/stack.yaml
index d1f4502f..12e65387 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -6,6 +6,8 @@ packages:
 extra-deps:
 - rio-0.1.21.0@rev:0
 - pantry-0.5.3@rev:0
+- hackage-security-0.6.0.1
+- ed25519-0.0.5.0
: 
$ stack --resolver nightly build
:
[ 62 of 111] Compiling Stack.Constants.Config [TH]
[ 74 of 111] Compiling Stack.Package

/var/home/petersen/haskell/stack/src/Stack/Package.hs:131:35: error:
    Not in scope: type constructor or class ‘D.Flag’
    Neither ‘Distribution.Package’, ‘Distribution.PackageDescription’,
            ‘Distribution.Text’,
            ‘Distribution.Verbosity’ nor ‘System.Directory’ exports ‘Flag’.
    |
131 |                               -> [D.Flag]
    |                                   ^^^^^^

/var/home/petersen/haskell/stack/src/Stack/Package.hs:938:13: error:
    Not in scope: type constructor or class ‘Flag’
    |
938 | flagMap :: [Flag] -> Map FlagName Bool
    |             ^^^^

/var/home/petersen/haskell/stack/src/Stack/Package.hs:940:17: error:
    Not in scope: type constructor or class ‘Flag’
    |
940 |   where pair :: Flag -> (FlagName, Bool)
    |                 ^^^^

/var/home/petersen/haskell/stack/src/Stack/Package.hs:989:21: error:
    Not in scope: data constructor ‘Flag’
    |
989 |                     Flag flag ->
    |                     ^^^^
Completed 166 action(s).

--  While building package stack-2.7.4 (scroll up to its section to see the error) using:
      /var/home/petersen/haskell/stack/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.1.0 build lib:stack exe:stack --ghc-options ""
    Process exited with code: ExitFailure 1

Stack version

$ stack --version
Version 2.7.3 x86_64
Compiled with:
- Cabal-3.2.1.0
:

Method of installation

  • An unofficial package repository (please specify which): Fedora Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions