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

Internal error message for cabal repl within project scope #10527

Open
philderbeast opened this issue Nov 5, 2024 · 2 comments · May be fixed by #10684
Open

Internal error message for cabal repl within project scope #10527

philderbeast opened this issue Nov 5, 2024 · 2 comments · May be fixed by #10684

Comments

@philderbeast
Copy link
Collaborator

Describe the bug
I'm getting an "internal error" mentioning fake-package-0 for a, possibly common, omission of a project target when bringing up the REPL.

To Reproduce
With this, the haskell/cabal repository, at its root folder, do the following;

$ 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.

We could say something like "Please provide a target from the packages or components of this project".

@OlegAlexander
Copy link

I just ran into this today. Yes, please consider adding an error message, like: "Please provide a target from the packages or components of this project" or "cabal repl at project scope detected. Please try cabal repl <target>".

@philderbeast
Copy link
Collaborator Author

To reproduce in this repository:

$ git rev-parse HEAD
4b2e5f03f1bbaa8b1afe32a5c390686507a175a1

$ cabal run cabal-install:exe:cabal -- repl
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
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.

@philderbeast philderbeast linked a pull request Dec 28, 2024 that will close this issue
6 tasks
@philderbeast philderbeast self-assigned this Dec 28, 2024
@philderbeast philderbeast mentioned this issue Dec 29, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants