Skip to content

Conversation

@ony
Copy link
Contributor

@ony ony commented Nov 30, 2019

When build as part of Stack it seems like Cabal package might be hidden
even from custom build. Results in error:

    [1 of 2] Compiling Main             ( /tmp/ws/libarchive/Setup.hs, /tmp/ws/libarchive/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/Main.o )
    [2 of 2] Compiling StackSetupShim   ( /.private/nikolay/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/ws/libarchive/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/StackSetupShim.o )
    
    /.private/nikolay/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:3:1: error:
        Could not load module ‘Distribution.PackageDescription’
        It is a member of the hidden package ‘Cabal-3.0.0.0’.
        You can run ‘:set -package Cabal’ to expose it.
        (Note: this unloads all the modules in the current scope.)
        It is a member of the hidden package ‘Cabal-2.4.0.1’.
        You can run ‘:set -package Cabal’ to expose it.
        (Note: this unloads all the modules in the current scope.)
        Use -v to see a list of the files searched for.
      |
    3 | import Distribution.PackageDescription (PackageDescription, emptyHookedBuildInfo)
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

Fixes #1

When build as part of Stack it seems like Cabal package might be hidden
even from custom build.

Fixes vmchale#1
@vmchale
Copy link
Owner

vmchale commented Dec 2, 2019

Thanks for getting to the bottom of this!

@vmchale vmchale merged commit 4f23768 into vmchale:master Dec 2, 2019
@ony ony deleted the bugfix/custombuild-dep branch December 2, 2019 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack support

2 participants