unisonweb / unison

A friendly programming language from the future

Home Page:https://unison-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improve error message for run.native tests.jit.only

kylegoetz opened this issue Β· comments

The command right now (for my work implementing UDP for the JIT) currently spits out the following when testing

```ucm
    runtime-tests/selected> run.native testsruntime-tests/selected> run.native tests.jit.only
    ```
    
    
    πŸ›‘
    
    The transcript failed due to an error in the stanza above. The error is:
    
    
      native evaluation failed
    
    
  Run `unison --codebase /Users/kylegoetz/.cache/unisonlanguage/runtime-tests.unison` to do more work with it.

Not a terribly useful error.

Though I'm not sure how it could be improved upon easily. The code that generates the error is

ExitSuccess ->
            decodeResult . deserializeNativeResponse
              =<< UnliftIO.takeMVar mv
          ExitFailure _ -> do
            UnliftIO.killThread tid
            pure . Left $ "native evaluation failed"

and ExitFailure wraps an INT only.