Skip to content

Missing package database if only installing boot packages #9310

Open
@noughtmare

Description

@noughtmare

Describe the bug

I recently installed GHC 9.6.3 and now I ran the command cabal install --lib --package-env . base ghc. This creates a environment file like this:

clear-package-db
global-package-db
package-db /Users/jaro/.cabal/store/ghc-9.6.3/package.db
package-id base-4.18.1.0
package-id ghc-9.6.3

However, I did not actually have a package.db for ghc-9.6.3 yet and this command does not create it. So, now when I try to run GHC using this environment file I get the error:

ghc-9.6.3: can't find a package database at /Users/jaro/.cabal/store/ghc-9.6.3/package.db

I would expect that this command either would actually ensure that the package db is created (or alternatively leave out that package-db line from the environment file).

To work around this issue I can just run a command that does actually build a package, e.g.: cabal repl -b tasty.

System information

  • Operating system: MacOS
  • cabal 3.10.1.0, ghc 9.6.3

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