Skip to content
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

stack setup --reinstall doesn't cause reinstallation #2554

Closed
sjakobi opened this issue Sep 1, 2016 · 7 comments
Closed

stack setup --reinstall doesn't cause reinstallation #2554

sjakobi opened this issue Sep 1, 2016 · 7 comments
Milestone

Comments

@sjakobi
Copy link
Member

sjakobi commented Sep 1, 2016

~ $ stack setup --help
...
  --[no-]reinstall         Enable/disable reinstalling GHC, even if available
                           (implies no-system-ghc)
...
~ $ stack setup
Run from outside a project, using implicit global project config
Using resolver: nightly-2016-08-25 from implicit global project's config file: /home/simon/.stack/global-project/stack.yaml
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
~ $ stack setup --reinstall -v
Version 1.2.1, Git revision a77c00b92b6edfb1ffd99a3fea9fd54b9ab1c66c (dirty) (4047 commits) x86_64 hpack-0.14.1
2016-09-01 04:07:53.920464: [debug] Checking for project config at: /home/simon/stack.yaml
@(Stack/Config.hs:797:9)
2016-09-01 04:07:53.920826: [debug] Checking for project config at: /home/stack.yaml
@(Stack/Config.hs:797:9)
2016-09-01 04:07:53.921018: [debug] Checking for project config at: /stack.yaml
@(Stack/Config.hs:797:9)
2016-09-01 04:07:53.921154: [debug] No project config file found, using defaults.
@(Stack/Config.hs:819:13)
2016-09-01 04:07:53.923710: [info] Run from outside a project, using implicit global project config
@(Stack/Config.hs:432:13)
2016-09-01 04:07:53.924760: [info] Using resolver: nightly-2016-08-25 from implicit global project's config file: /home/simon/.stack/global-project/stack.yaml
@(Stack/Config.hs:446:32)
2016-09-01 04:07:53.925006: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/nightly-2016-08-25.cache
@(Data/Store/VersionTagged.hs:68:5)
2016-09-01 04:07:53.946823: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/nightly-2016-08-25.cache
@(Data/Store/VersionTagged.hs:72:13)
2016-09-01 04:07:53.954226: [debug] Run process: /sbin/ldconfig -p
@(System/Process/Read.hs:277:3)
2016-09-01 04:07:53.957091: [debug] Process finished in 2 ms: /sbin/ldconfig -p
@(System/Process/Read.hs:277:3)
2016-09-01 04:07:53.958039: [debug] Did not find libtinfo.so.6 or libgmp.so.3; using standard GHC build
@(Stack/Setup.hs:503:25)
2016-09-01 04:07:53.960657: [debug] Performing a sanity check on: /home/simon/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc
@(Stack/Setup.hs:1450:5)
2016-09-01 04:07:53.961316: [debug] Run process: /home/simon/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc /tmp/stack-sanity-check17467/Main.hs -no-user-package-db
@(System/Process/Read.hs:277:3)
2016-09-01 04:07:54.620799: [debug] Process finished in 659 ms: /home/simon/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc /tmp/stack-sanity-check17467/Main.hs -no-user-package-db
@(System/Process/Read.hs:277:3)
2016-09-01 04:07:54.621690: [info] stack will use a sandboxed GHC it installed
@(Stack/SetupCmd.hs:105:19)
2016-09-01 04:07:54.621794: [info] For more information on paths, see 'stack path' and 'stack exec env'
@(Stack/SetupCmd.hs:106:5)
2016-09-01 04:07:54.621900: [info] To use this GHC and packages outside of a project, consider using:
@(Stack/SetupCmd.hs:107:5)
2016-09-01 04:07:54.621991: [info] stack ghc, stack ghci, stack runghc, or stack exec
@(Stack/SetupCmd.hs:108:5)

To me --reinstall sounds like it should always cause reinstallation. I'd expect it at least to remove and restore /home/simon/.stack/programs/x86_64-linux/ghc-8.0.1 in my case.

If it should turn out that --reinstall behaves as intended, at least the help text should be improved.

@mgsloan
Copy link
Contributor

mgsloan commented Sep 26, 2016

Curious! This does indeed appear to be a bug.

@mgsloan mgsloan added this to the P1: Must milestone Sep 26, 2016
@alexanderkjeldaas
Copy link
Contributor

Just want to walk by and say that I'm also affected by this as a GHCJS user who needs to update the compiler at regular intervals.

@alexanderkjeldaas
Copy link
Contributor

alexanderkjeldaas commented Nov 27, 2016

$ stack setup --reinstall
stack will use a sandboxed GHCJS it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHCJS and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
$

mgsloan added a commit that referenced this issue Nov 27, 2016
@mgsloan
Copy link
Contributor

mgsloan commented Nov 27, 2016

@sjakobi @alexanderkjeldaas I believe this is now fixed. I haven't tested it with GHCJS, but it does work for forcing reinstall of GHC. Can you please confirm that the issue is resolved on master?

@decentral1se
Copy link
Member

Polite bump for @sjakobi @alexanderkjeldaas 👍

@sjakobi
Copy link
Member Author

sjakobi commented Jan 20, 2017

Polite bump for @sjakobi

Works for me with GHC :)

~ $ stack setup --reinstall
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.                
Installed GHC.                                                                 
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

@mgsloan
Copy link
Contributor

mgsloan commented Jan 31, 2017

Great!

@mgsloan mgsloan closed this as completed Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants