Skip to content

Commit

Permalink
Give a nicer looking error for ucr/raco problems
Browse files Browse the repository at this point in the history
  • Loading branch information
dolio committed Feb 6, 2024
1 parent 2e98e1a commit c3c62c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions parser-typechecker/src/Unison/Runtime/Interface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,19 @@ nativeCompileCodes codes base path = do
waitForProcess ph
pure ()
callout _ _ _ _ = fail "withCreateProcess didn't provide handles"
ucrError (_ :: IOException) =
die
"I had trouble calling the unison runtime exectuable.\n\n\
\Please check that the `ucr` executable is properly\
\ installed."
racoError (_ :: IOException) =
die
"I had trouble calling the `raco` executable.\n\n\
\Please verify that you have racket installed."
withCreateProcess (ucrProc ["-G", srcPath]) callout
`UnliftIO.catch` ucrError
callProcess "raco" ["exe", "-o", path, srcPath]
`UnliftIO.catch` racoError

evalInContext ::
PrettyPrintEnv ->
Expand Down

0 comments on commit c3c62c4

Please sign in to comment.