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

Solver cabal install hint #4100

Merged
merged 2 commits into from
Jun 20, 2018
Merged

Solver cabal install hint #4100

merged 2 commits into from
Jun 20, 2018

Conversation

adrianwong
Copy link
Contributor

Resolves #3841.

Recover from all errors on invoking proc "cabal" --numeric-version.

This reintroduces the helpful hint to stack install cabal-install if stack solver is run when cabal is not on PATH, instead of displaying the exception message propagated from RIO (thanks for the help, @mgsloan!).

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

  • Ran stack solver on a project using an existing version of stack, with and without cabal on PATH
  • Ran stack solver on the same project using the modified stack, with and without cabal on PATH. Verified that the helpful hint was displayed without cabal on PATH; verified that stack solver ran without issue with cabal on PATH

@dbaynard dbaynard merged commit 18c83ff into commercialhaskell:master Jun 20, 2018
@dbaynard
Copy link
Contributor

Thanks, @adrianwong. Would you like some more newcomer-friendly issues to tackle?

@adrianwong adrianwong deleted the solver-cabal-install-hint branch June 20, 2018 23:16
@adrianwong
Copy link
Contributor Author

@dbaynard If it's within my ability as a Haskell scrub, I'm keen. I was thinking of tackling #3863 next, but I'm open to suggestions.

@adrianwong adrianwong mentioned this pull request Jun 20, 2018
2 tasks
@dbaynard
Copy link
Contributor

That's good to hear. Tackle the ones that appeal (and please do continue to note that you'll be working on the issue)!

@dbaynard dbaynard self-requested a review June 21, 2018 13:17
@dbaynard
Copy link
Contributor

(I just wanted to make clear I'd reviewed this — I should have added myself as reviewer earlier)

@madnight
Copy link

Hmm, when i run stack install cabal-install as suggested i get the following error:

solver must be one of: modular
CallStack (from HasCallStack):
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:49:24 in Cabal-2.2.0.1:Distribution.ReadE
ghcjs-boot: error running: /usr/bin/cabal --config-file /home/x/.ghcjs/x86_64-linux-0.2.1.9007019-8.0.1/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /home/x/.stack/programs/x86_64-linux/ghcjs-0.2.1.9007019_ghc-8.0.1/src/.stack-work/install/x86_64-linux-tinfo6/lts-7.19/8.0.1/bin/ghcjs --with-hc-pkg /home/x/.stack/programs/x86_64-linux/ghcjs-0.2.1.9007019_ghc-8.0.1/src/.stack-work/install/x86_64-linux-tinfo6/lts-7.19/8.0.1/bin/ghcjs-pkg --prefix /home/x/.ghcjs/x86_64-linux-0.2.1.9007019-8.0.1/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling -v2 --dry-run
exit status: 1
stderr: solver must be one of: modular
CallStack (from HasCallStack):
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:49:24 in Cabal-2.2.0.1:Distribution.ReadE

@dbaynard
Copy link
Contributor

@madnight That ghcjs-boot line jumps out (see #4086). I'd like to see the stack.yaml and .cabal files you're using.

@madnight
Copy link

@dbaynard i fixed it by switching to nix build, which was a suggestion from irc, i'm not even sure if the current ghcjs master can be build with stack

@dbaynard
Copy link
Contributor

Some aspects of ghcjs (probably setting up the ghcjs, though not using ghcjs) are in the process of being deprecated #4086.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants