Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake package leaking when no [TARGETS] #9983

Open
philderbeast opened this issue May 7, 2024 · 2 comments
Open

Fake package leaking when no [TARGETS] #9983

philderbeast opened this issue May 7, 2024 · 2 comments
Labels
re: user experience User experience (UX) issue type: bug

Comments

@philderbeast
Copy link
Collaborator

philderbeast commented May 7, 2024

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
@philderbeast philderbeast added type: bug re: devx Improving the cabal developer experience (internal issue) needs triage labels May 7, 2024
@ffaf1 ffaf1 removed the needs triage label May 7, 2024
@stephen-smith
Copy link

stephen-smith commented Jul 9, 2024

Just noticed this today on an internal project. Anything I can collect and share to help? I thought this used to work with cabal-install 3.10, but the internal project now requires 3.12 so I haven't tested an older commit, yet.

EDIT: No, this did NOT work on 3.10. It just had a different error message that I found easier to understand.

@ulysses4ever ulysses4ever added re: user experience User experience (UX) issue and removed re: devx Improving the cabal developer experience (internal issue) labels Jul 9, 2024
@srid
Copy link

srid commented Nov 25, 2024

This can be reproduced on top of srid/haskell-multi-nix@9286987 by adding multi-repl: True to the cabal.project file followed by nix develop -c cabal repl:

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.

Uses GHC 9.6.6 and Cabal 3.12.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: user experience User experience (UX) issue type: bug
Projects
None yet
Development

No branches or pull requests

5 participants