-
Notifications
You must be signed in to change notification settings - Fork 711
Implement cabal sandbox hc-pkg
/ cabal sandbox buildopts
#1200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In the discussion in #1195 it was suggested that I just use ghc-pkg to remove things from my sandbox, so I've been doing that. But I just encountered a situation where that is not sufficient. I have three projects, call them alpha, beta, and gamma. beta depends on alpha, and gamma depends on both alpha and beta. gamma is my top-level project and it is the one where I'm using a cabal sandbox. (It also depends on a number of other local packages that may or may not be on hackage.) Originally I was working on changes that affected beta and gamma. If I made changes to beta, I would use ghc-pkg to unregister it from gamma's sandbox and then do sandbox-install to build gamma with the new changes. In spite of the advice against this approach, it seemed to be the most efficient way to make improvements to beta and test those changes in the context of gamma. But when I made a change to alpha this pattern failed. I used ghc-pkg to unregister both alpha and beta from the gamma sandbox and then did
So it appears that unregistering with ghc-pkg is not sufficient. I was able to fix the problem with |
@mightybyte Can you open a separate ticket for this issue? |
Yes, but I'm not sure what the ticket should say. To me this just seems like an implementation detail for this ticket. |
@mightybyte I suspect that it's a ghc-pkg issue and the same error happens with cabal-dev. |
See haskell#1200 (for which this is a partial fix).
btw, imo |
sandbox functionality is removed. |
cabal-dev
has a commandghc-pkg
which is handy for manipulating the sandbox package DB usingghc-pkg
:It'd be nice if
cabal sandbox
also supported this feature (see discussion in #1195). Additionally, there iscabal-dev buildopts
that extracts the options that would be passed to the compiler when building.The text was updated successfully, but these errors were encountered: