-
Notifications
You must be signed in to change notification settings - Fork 842
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 there going to be a way to upgrade Stack? #237
Comments
+1 |
There's an open issue for discussing this point, which we do need to get a solid answer to: |
I see the two issues as separate. One is about how you typically do a first install. One is about how you do an update. On Linux these might be the same, but on Windows you want to copy a binary the first time then |
@ndmitchell There's always chocolatey. |
If stack grows a way to install packages to the system (whether in /usr or in ~/.local or whatever), then it would make sense for the upgrade process to just be to use that mechanism. ( To make this interoperate with the initially downloaded binary, perhaps lein could be used as an inspiration: when you download lein, you're just getting a shell script, which checks if lein is installed in the user's home directory in the expected location, and then invokes that. If not, it downloads and installs the latest version. This means that even if the package isn't "really" installed, the first time the user runs lein, it's installed properly. Of course this mostly just applied to OS X and Unix, but I guess the same general idea can be applied to Windows as well. It's just that you can't rely on a simple shell script in that case. |
@radix So lein has some sort of proxy script that does update-checking/downloading before running an actual app? Instead of a script, you could do that with a thin executable binary that would be cross-platform. |
@3noch yeah, good point. bash isn't a great language to write software in :) |
@radix Haskell's ability to run on bare metal is a huge selling point in my book! |
FWIW, "binary that would be cross-platform" would of course mean we'd need several binaries, one for each platform, but the code would be the same. |
What if stack itself had this logic, something along the lines of:
|
For Mac OSX homebrew support would be great. |
My only thought is that now you really have two (or more) versions of a working |
I slightly fear stack upgrading itself to change the way it upgrades itself and then breaking... |
Now that I've got the |
Brilliant. |
|
💡 I would leave it open until doc is written. docker does this to keep doc in sync, it would benefit to this project I think |
There is a documentation label already. My intent in the previous comment was: if everyone's happy with the behavior, let's update the docs and close this. I don't want to tell everyone "this is how you upgrade" in the docs unless we agree that this is the right way to upgrade. |
oups, got it, thanks for the explanation (and all that amazing work) |
Sounds perfect, since it exactly matches Cabal (at least the first one does). |
OK, comment added to download page. |
I can't get the upgrade to work, I always get an error akin to the following:
|
This is a good point, we do need a different upgrade path. Options:
I favor (1), and then maybe having a special |
I'll leave the discussion up to you guys. I don't have a good sense of the answer. I don't particularly relish the thought of (4) since I'm imprisoned by Window's lack of a good package management system. |
@3noch I don't favor it either, but Windows users have been converging on using things like Chocolatey – I mention this not because I think Stack should rely on such things in Windows but so that you know it exists in case you did not. |
Actually, there's a much simpler solution that I should have realized: just wait. Once stack is included in LTS 3.0, installing it will work correctly. That said, having some kind of a command for So my proposed next steps:
|
I've just pushed a commit which adds
If anyone wants to test it out, that would be great. |
I'm going to mark as resolved for now, if issues pop up, let's discuss in a new issue. |
|
What's the relationship with ~/.local/bin? After running 'stack upgrade --git' I now have two instances of stack installed:
which was installed and I assume is controlled by the package from the PPA as directed by the Readme
which was installed by the upgrade. If this is the desired result, better documentation is needed to explain the two instances. |
This information is actually covered on the Downloads page: https://github.com/commercialhaskell/stack/wiki/Downloads#path If you see a way to clarify the situation, please update the docs, it will On Fri, Jul 31, 2015 at 12:24 PM, Karl Berger [email protected]
|
Haha, I feel like such a user for not reading the docs in detail. For clarification, the 'advantageous' thing to do would be to move the stack executable out of /usr/bin/stack to ~/.local/bin and add that directory to my PATH? Should I then just ignore upgrades that come via the PPA/apt and just make sure I 'stack upgrade' from time to time? Just want to make sure I've got the workflow down. |
Here's the idea:
This isn't really any kind of hard-coded rule, just commonly evolving patterns that people use. Actually, I used the exact some workflow with |
That all sounds quite reasonable, thanks. I should have taken a bigger hint from upgrade being marked "experimental" and figured that I probably didn't want that just blasting away the "stable" install. |
With Arch, for the next release, the git version and the stable release On Fri, Jul 31, 2015 at 12:41 PM, Karl Berger [email protected]
Tristan Webb PhD |
Say I've installed Stack by downloading the binary distribution for Mac OS X -- it'd be nice if I could just run something like "stack upgrade-stack" to get a new release -- and also, for stack to notify when there's a new version, a la Python's
pip
tool.The text was updated successfully, but these errors were encountered: