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
To select which ghc version to use, I use the -w flag, like cabal install -w ghc-7.8 ....
However, when I use cabal sandbox hc-pkg list, I will only always get results for .cabal-sandbox/x86_64-linux-ghc-7.6.3-packages.conf.d.
Should cabal sandbox hc-pkg have a -w flag, or is there a different way to select which compiler's package db hc-pkg shall look at? If so, it would be great if that could be mentioned in cabal help sandbox.
Ah, good to know. That means though that I first have to create some cabal package source instead of "just" looking what is in my sandbox. It would probably make sense to also have a way to do it without.
I had the same problem with respect to both cabal sandbox hc-pkg and cabal repl, but if it works to repeat cabal configure in place then that seems ok.
@23Skidoo
this does not seem to work, on both 1.20.0.3 and some commits behind master. maybe i am missing something; this is what i did:
> cabal get foo
> cd foo-1.0.0.0
> cabal sandbox init
> cabal install --only-dependencies -w PATH_TO_CUSTOM_GHC
> cabal configure -w PATH_TO_CUSTOM_GHC
> cabal sandbox hc-pkg list
[only boot-packages; also it uses the default ghc version (not the one specified at configure)]
> ls .cabal-sandbox/lib/ARCH-CUSTOMGHCVERSION/
[non-empty set of libraries]
The problem with cabal sandbox hc-pkg not using the configured compiler is fixed by #2859. For the remaining feature request (-w flag for cabal sandbox hc-pkg and cabal exec) see #2177.
Activity
23Skidoo commentedon May 26, 2014
Right now
hc-pkguses the compiler that the package was configured with. Example:nh2 commentedon May 26, 2014
Ah, good to know. That means though that I first have to create some cabal package source instead of "just" looking what is in my sandbox. It would probably make sense to also have a way to do it without.
rrnewton commentedon May 30, 2014
I had the same problem with respect to both
cabal sandbox hc-pkgandcabal repl, but if it works to repeatcabal configurein place then that seems ok.lspitzner commentedon Nov 29, 2014
@23Skidoo
this does not seem to work, on both 1.20.0.3 and some commits behind master. maybe i am missing something; this is what i did:
adamgundry commentedon Oct 11, 2015
The problem with
cabal sandbox hc-pkgnot using the configured compiler is fixed by #2859. For the remaining feature request (-wflag forcabal sandbox hc-pkgandcabal exec) see #2177.