Skip to content

Cabal 2's internal libraries don't work with HEAD #3361

Closed
@bucklereed

Description

@bucklereed

Cabal 2 support has just landed in HEAD with #3288 (hurrah), but one of the shiny new features doesn't work with stack yet: internal libraries (introduced in haskell/cabal#3022). A short demonstration:

$ cat internal-library-test.cabal 
name: internal-library-test
version: 1
cabal-version: >= 1.24

library internal-library-test-lib
  exposed-modules: Foo
  default-language: Haskell2010

executable exe
  main-is: Main.hs
  default-language: Haskell2010
  build-depends: internal-library-test-lib
$ cat stack.yaml 
resolver: lts-9.1
packages: ['.']
$ stack build

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for internal-library-test-1:
    internal-library-test-lib must match -any, but the stack configuration has no specified version
needed since internal-library-test-1 is a build target.

Plan construction failed.
$ stack --version
Version 1.5.1, Git revision aa5003a153504f54051e42a844a0c1c3d7f82163 i386 hpack-0.17.1

I think that this ought to work as-is (that is, without anything internal-library-specific in stack.yaml), but it wouldn't be a disaster if it needed some magical incantation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions