-
Notifications
You must be signed in to change notification settings - Fork 705
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
Is .store safe to share between different versions of cabal? #5073
Comments
Hm, I suspect not, here is a random failure I just saw after
|
I don't understand the failure at all, but here's all I did to cause it:
|
I can't seem to reproduce this failure so I'm not sure what was going on a few hours ago. |
I'm not sure about the issue itself, e.g. if |
@mitchellwrosen going forward (i.e. past cabal 2.0), it should be safe (unless we end up requiring BC changes; at which point we'll hopefully notice and figure out a way to give good warnings/errors), but it can easily be that you end up with different Nix hashes for different |
Okay, good to know.
Ah, interesting. I should get in the habit of using different I've been using this (disclaimer: script is bad) to switch between global installations of It's possible I should also build a small "cabal-aware" cabal wrapper that does things like:
|
@mitchellwrosen that's an interesting script; however, it seems to use symlinks rather than exploiting cabals built-in ability to switch between different compilers: the |
Oops! I was not aware of the That is to say,
and so on. Am I wrong about this? Is it okay to build, say, a project that specifies an older version of |
It was an issue in the past; but since at least |
Great, thanks for the info. I still have one outstanding question about
or should I instead
|
Cabal caches the build project but not the install plan. So the cost of switching is we have to redepsolve and replan, but then the compile products will be cached. |
I meant to clarify this comment above:
with respect to the "safety" of sharing one |
In an ideal world you could just switch GHC versions and not have to worry about it. This is something we should support. In practice it is supported reasonably well, at least when I've been using it. The benefit is you have to type less in the command line :) |
The benefit of different builddirs is that you can run `new-build`s with different GHCs concurrently. It's not something an average user would do, though.
…Sent from my iPhone
On 26 Jan 2018, at 21.43, Mitchell Rosen ***@***.***> wrote:
I meant to clarify this comment above:
dist-newstyle however is a bit of a different story
with respect to the "safety" of sharing one dist-newstyle directory across builds with multiple versions of ghc. As a hypothetical end-user with absolutely no knowledge of what cabal is doing under the hood (which in my case is more or less accurate), is it okay or ill-advised? You mention there is a "cost" to switching directories, but what might the benefit be (if any)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok! thanks all! The fact that the newest |
Hi, is it safe if different versions of
cabal-install
share the same.cabal/store
? Thanks.The text was updated successfully, but these errors were encountered: