cabal-install reconfigures each time PATH changes

Aperta
#12,481 2 commenti 4 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@sheaf ci sta già lavorando.

Dal 23/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

attention: pr-welcome blocked: needs reproducer cabal-install: cmd/(re)configure regression in 3.16 type: bug

Since 55aba1413b1b24f4eefa573300a8787f4804f734 (#10817 fixing #2015), cabal-install re-configures anytime PATH changes. That's a horrible user experience, in my opinion.

I think that commit was the wrong way to fix #2015. In that ticket, people were (rightfully) complaining that cabal repl inherited a stale PATH. This is because cabal baked in the value of PATH into the ghc ConfiguredProgram at the time of configuring ghc. I think that's nuts, and the fix was somehow to always reconfigure???

Even PR #10817 agrees that this is not ideal: "An alternative approach would be to stop baking the PATH variable into the environment of programs, but this would require more substantial changes to how Cabal manages environment variables." and I agree.

I argue we should change Cabal to store PATH symbolically (as an un-expanded variable) in ConfiguredProgram, and expand that variable in runProgramInvocation at program invocation time. This allows all of the existing override logic to work as before, but it does not require baking in PATH into ConfiguredProgram and thus completely sidesteps the issue. Then we no longer need to reconfigure if PATH changes.

Lingua principale
Haskell
Stelle
1.8k
Fork
766
Merge medio
5g 21h
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/cabal

Tutte le issue di haskell/cabal

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.