You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Magic" behavior when cabal exec is used with with-compiler: #10196
changed the title [-]*Magic* behavior when `cabal exec` is used with `with-compiler:`[/-][+]"Magic" behavior when `cabal exec` is used with `with-compiler:`[/+]on Jul 12, 2024
I think from a user perspective it's a disaster that e.g. cabal exec ghc ... and cabal exec env ghc ... don't do the same thing.
I think I agree with @geekosaur that a dedicated sub command would have offered a more principled way to invoke the configured ghc (e.g. cabal exec-compiler). However, changing this now would be a breaking change.
For cabal-doctest I'm using the output of cabal path, which requires cabal-install-3.12.*. However, as sub commands are only supported since 3.12.* that's acceptable for cabal-doctest.
Activity
[-]*Magic* behavior when `cabal exec` is used with `with-compiler:`[/-][+]"Magic" behavior when `cabal exec` is used with `with-compiler:`[/+]hasufell commentedon Jul 19, 2024
Yes, it's documented:
cabal/cabal-install/src/Distribution/Client/CmdExec.hs
Line 136 in eacb6d0
hasufell commentedon Jul 19, 2024
Yes, see https://github.com/haskell/hie-bios/blob/6a06ed72706a533f20a06823650f165203aeb221/src/HIE/Bios/Cradle.hs#L768
geekosaur commentedon Jul 19, 2024
Isn't the principled way to do this a
cabal hccommand? (Possibly with support for something similar to--repl-multi-file.)sol commentedon Jul 27, 2024
Thanks @hasufell.
I think from a user perspective it's a disaster that e.g.
cabal exec ghc ...andcabal exec env ghc ...don't do the same thing.I think I agree with @geekosaur that a dedicated sub command would have offered a more principled way to invoke the configured
ghc(e.g.cabal exec-compiler). However, changing this now would be a breaking change.For
cabal-doctestI'm using the output ofcabal path, which requirescabal-install-3.12.*. However, as sub commands are only supported since3.12.*that's acceptable forcabal-doctest.