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

Improve error messages if cabal invocation fails #338

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Mar 6, 2022

Turns this:

Cradle failed to load
Deps: ["hie-bios.cabal","cabal.project","cabal.project.local"]
Exit Code: ExitFailure 1
Stderr: Failed to parse result of calling cabal

Warning: cannot determine version of
/home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 :
""
cabal: The program 'ghc' version >=7.0.1 is required but the version of
/home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 could not
be determined.

into this:

Cradle failed to load
Deps: ["hie-bios.cabal","cabal.project","cabal.project.local"]
Exit Code: ExitFailure 1
Stderr: Failed to parse result of calling cabal
Failed command: cabal --builddir=/home/hugin/.cache/hie-bios/dist-hie-bios-e7a73b2ffd58a3db6a855ec871bcd65b v2-repl --with-compiler /home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/hugin/.cache/hie-bios/ghc-pkg-58f7a37e9d8fd141faa884453f82f93a tests/BiosTests.hs

Warning: cannot determine version of
/home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 :
""
cabal: The program 'ghc' version >=7.0.1 is required but the version of
/home/hugin/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 could not
be determined.



Process Environment:
HIE_BIOS_GHC: /home/hugin/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/bin/ghcit :: ()
HIE_BIOS_GHC_ARGS: -B/home/hugin/.ghcup/ghc/8.10.7/lib/ghc-8.10.7

note the new command that failed to execute and the content of environment variables that hie-bios manages.

@fendor fendor force-pushed the polish/better-error-messages branch 2 times, most recently from 5876e83 to 08260da Compare March 6, 2022 20:12
@fendor fendor requested review from pepeiborra and hasufell and removed request for pepeiborra March 6, 2022 22:14
@fendor fendor force-pushed the polish/better-error-messages branch from 08260da to fbe8029 Compare March 7, 2022 14:46
@fendor fendor force-pushed the polish/better-error-messages branch from fbe8029 to facf4ae Compare March 7, 2022 18:48
@fendor fendor merged commit 0098b1f into haskell:master Mar 7, 2022
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.

None yet

2 participants