cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Add alt.project tests for ReplOptions

Open philderbeast opened this issue 10 months ago • 1 comments

Reproduction of the failure for #10689. The cabal.project has its one package in the same directory whereas alt.project has one package but in another directory, alt.

$ ~/.ghcup/bin/cabal-3.14.1.0 repl --project-file=cabal.project
...
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Build profile: -w ghc-9.10.1 -O1
In order, the following will be built (use -v for more details):
 - cabal-repl-options-0.1 (interactive) (lib) (first run)
Preprocessing library for cabal-repl-options-0.1...
GHCi, version 9.10.1: https://www.haskell.org/ghc/  :? for help
[1 of 2] Compiling ModuleA          ( ModuleA.hs, interpreted )
[2 of 2] Compiling ModuleC          ( ModuleC.hs, interpreted )
Ok, two modules loaded.
ghci> :q
Leaving GHCi.

$ ~/.ghcup/bin/cabal-3.14.1.0 repl --project-file=alt.project
...
Configuration is affected by the following files:
- alt.project
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.

  • [x] Patches conform to the coding conventions.
  • [ ] Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

philderbeast avatar Dec 29 '24 17:12 philderbeast