Skip to content

Fake package leaking when no [TARGETS] #9983

Open
@philderbeast

Description

There are quite a few fake-package issues. The user experience around this is not good when a cabal command expecting [TARGETS] is called without a target.

With haskell/containers@c651094;

$ cabal repl
Resolving dependencies...
Error: [Cabal-7076]
Internal error when trying to open a repl for the package fake-package-0.
The package is not in the set of available targets for the project plan, which
would suggest an inconsistency between readTargetSelectors and resolveTargets.

$ cabal repl containers
Resolving dependencies...
Build profile: -w ghc-9.8.2 -O1
In order, the following will be built (use -v for more details):
 - containers-0.6.8 (interactive) (lib) (configuration changed)
...
Ok, 37 modules loaded.
ghci> 

There is a cabal.project that we could use to list possible [TARGETS], such as those shown by #9744.

packages:
  containers/
  containers-tests/

tests: True
benchmarks: True

-- package containers-tests
--   ghc-options: -Werror

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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