Content-Length: 271610 | pFad | http://github.com/haskell/cabal/issues/10971

3E `cabal exec -- cabal install --lib ...` corrupts the cabal store · Issue #10971 · haskell/cabal · GitHub
Skip to content

cabal exec -- cabal install --lib ... corrupts the cabal store #10971

Open
@sol

Description

@sol

Steps to reproduce:

Given a .cabal file and some dummy module:

cabal-version:  3.14
name:           hello
version:        0.0.0
build-type:     Simple

library
  default-language: Haskell2010
  build-depends: base == 4.*, base-compat
  hs-source-dirs: src
  exposed-modules: Run
-- src/Run.hs
module Run where
main :: IO ()
main = putStrLn "Hello, World!"

Running cabal exec -- cabal install --lib ... produces a corrupted package environment:

$ rm -rf ~/.local/state/cabal/store/
$ rm -rf env && cabal exec -- cabal install -z --lib silently --package-env ./env
$ GHC_ENVIRONMENT=./env ghci
Loaded package environment from ./env
GHCi, version 9.10.1: https://www.haskell.org/ghc/  :? for help
<command line>: libHShello-0.0.0-inplace-ghc9.10.1.so: cannot open shared object file: No such file or directory

This of itself would not really be an issue. What is an issue however, is that it also corrupts the cabal store and that successive runs of the same command without cabal exec will reproduce the broken package environment:

$ rm -rf env && cabal install -z --lib silently --package-env ./env
$ GHC_ENVIRONMENT=./env ghci
Loaded package environment from ./env
GHCi, version 9.10.1: https://www.haskell.org/ghc/  :? for help
<command line>: libHShello-0.0.0-inplace-ghc9.10.1.so: cannot open shared object file: No such file or directory

System information

  • cabal-install-3.14.2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/haskell/cabal/issues/10971

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy