-
Notifications
You must be signed in to change notification settings - Fork 206
stack install.hs build-all
installs cabal in $HOME/.local/bin
#1327
Comments
Would you prefer that the command fails if no appropriate cabal version can be found? |
Hopefully, this can be removed in the future, but currently the cabal Binary is a runtime dependency of hie |
Still, instead of automatically installing a cabal version we need, it might be better to show an error message and let the user decide how to resolve the problem with cabal. |
Another approach could be (optionally) download runtime dependencies at runtime, when precompiled binaries are available and the tool is not present in path or custom location (like stack does with ghc) |
I am against downloading dependencies at runtime since this increases startup-latency even further. The current state is not pretty, but the current plugins do not allow a better solution. For this reason, I would like to close this issue. |
Mmm, totally agree with that, but if we want at some point offer hie as a precompiled binary itself (imho essential to increase the user base) we have to solve this anyway. I think initiated haskell devs will have already It actually is 40-70 Mb so i think the delay will not be terrible, right? |
Well, on a 1Mbit/s connection that is already more than a minute. However, the bigger problem I see is, if you use an older cabal and a newer one on the same project, a lot of stuff breaks. E.g. the user uses the pre shipped with their distro cabal version |
I hope for a more isolated deployment in the future. The hie-bios will open a lot of possibilities and the hlint data files would be a first step when I get around to them. However, this is a non-trivial multi step process and has currently a blocker in most cases. |
Out of curiosity i've test switching cabal versions ( Maybe switching between more distant versions or using The caveat i am thinking now it is once you start to control a runtime dependency it is difficult to stop and cabal is a wild beast with lot of switches and its own runtime deps (f.e. ghc itself). So maybe the wiser option would be follow the @fendor's proposal:
|
I see the merits of this proposal. However, I am strictly against implementing this approach.
Maybe these are not the best arguments and I agree installing |
fair enough, we can handle cabal later as part of other runtime deps, in the context of #1068
mmm, it seems it is installed too if the version of the previous one doesnt match the required by hie (including if it is a newer one, i guess). I think that maybe we should avoid overwrite the existing one and warn the user about the version mismatch and its consequences (or at least overwrite it but warn the user about it). That was your case @alexanderkjeldaas? did you have a previous cabal installed with another version than |
Fair enough. Currently, we overwrite a |
should this issue be closed by #1344? This PR implements the changes as described in my previous comment (#1327 (comment)) |
@power-fungus imo that is the case, @alexanderkjeldaas could ask to reopen it is not. |
I was a bit surprised that
stack install.sh build-all
installs a newcabal
into$HOME/.local/bin
. That seems to go a bit beyond what that command is supposed to do.The text was updated successfully, but these errors were encountered: