Repl started with --enable-multi-repl **and** _without_ passing the name of an executable in a project with the unnamed library stanza, inherits a different PATH than otherwise
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- haskell
- Domain
- build-system, cli
Research direction
Reproduce the issue using the described foo.cabal and cabal.project files, then run each listed cabal repl command and compare :! echo $PATH with :! ghc --version. Start at the cabal repl handling for the unnamed library stanza and --enable-multi-repl behavior. Done means all four commands inherit the same PATH and select the expected GHC version.
Written by the indexing model from the issue text.
Description
Describe the bug
Given a foo.cabal file with library and executable exe stanzas, the repl started with any of these 3 commands
cabal repl,cabal repl exe,cabal repl --enable-multi-repl exe
inherits a different PATH than if it was started with this command:
cabal repl --enable-multi-repl
To Reproduce
Create a project with this directory structure:
.
├── cabal.project
├── exe
│ └── Exe.hs
├── foo.cabal
└── lib
└── Lib.hs
3 directories, 4 files
where
cabal.projectcontainspackages: .foo.cabalcontainscabal-version: 3.4 name: foo version: 0 library build-depends: base exposed-modules: Lib hs-source-dirs: lib executable exe build-depends: base hs-source-dirs: exe main-is: Exe.hsLib.hscontainsmodule Lib () where- and
Exe.hscontainsmain :: IO () main = putStrLn "Hello World"
With the above, start the repl via these 3 commands
cabal repl,cabal repl exe,cabal repl --enable-multi-repl exe
and in each of the repls, issue both :! echo $PATH and :! ghc --version.
The latter command reports the GHC version selected in GHCup at that moment, as expected.
Now, run this 4th command:
cabal repl --enable-multi-repl
and issue both :! echo $PATH and :! ghc --version.
The output will be different, and in particular :! ghc --version reports - unexpectedly to me - GHC 9.6.6.
Why is that?
Expected behavior
All 4 cabal repl ... commands should inherit the same PATH.
System information
- up-to-date ArchLinux
- XMonad installed via
pacman- this brings in the dependency on the
ghc, version 9.6.6
- this brings in the dependency on the
cabal3.16.1.0 installed via GHCup 0.2.6.2,ghc9.14.1 and 9.12.2 installed via GHCup 0.2.6.2
Additional context
I've searched, but haven't found anything that strikes me as the same issue.
- Dominant language
- Haskell
- Stars
- 1.8k
- Forks
- 766
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/cabal
-
needs triage type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
needs triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
haskell/cabal#12568 · 1 comment ·
Maintainers usually reply within 3 days
-
needs triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
haskell/cabal#12525 · 3 comments · 1 reaction ·
Maintainers usually reply within 3 days
-
Required version of `cabal-install` to build CabalPossibly taken @philderbeast claimed this 24 days ago. Opendocumentation type: discussion
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
haskell/cabal#12477 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
Document which are our LTS releasesPossibly taken @KeuqS claimed this 41 days ago. Opendocumentation type: discussion
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
haskell/cabal#12373 · 2 comments ·
Maintainers usually reply within 3 days
Similar issues
-
bug desktop
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
simplex-chat/simplex-chat#8291 ·
Maintainers usually reply within 1 day
-
[BUG]: C# programs with top-level statements fail to compilePossibly taken @AsyncNigam claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
compiler-explorer/compiler-explorer#9625 · 1 comment ·
Maintainers usually reply within 1 day
-
reflex-0.10Open
Difficulty 1/5 Under an hour Newbie friendliness 62/100
commercialhaskell/stackage#8180 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenZeppelin/canton-contracts#140 ·
Maintainers usually reply within 1 day
-
takeInterval yields nothing, dropInterval drops nothingPossibly taken @GuillaumedeVolpiano claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
composewell/streamly#3271 ·