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

Eval Plugin: different exception rendering than doctest #2353

Closed
Profpatsch opened this issue Nov 14, 2021 · 0 comments · Fixed by #2775
Closed

Eval Plugin: different exception rendering than doctest #2353

Profpatsch opened this issue Nov 14, 2021 · 0 comments · Fixed by #2775

Comments

@Profpatsch
Copy link

Profpatsch commented Nov 14, 2021

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

> haskell-language-server --probe-tools
haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /nix/store/2sxjf20hy89835gxa07a80hqsg25aywq-haskell-language-server-1.4.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:		3.6.0.0
stack:		Not found
ghc:		8.10.7

Which OS do you use:

nixos
Which lsp-client do you use:

vscode
Describe your project (alternative: link to the project):

https://hackage.haskell.org/package/error
Contents of hie.yaml:
none

Steps to reproduce

Use the eval plugin to evaluate a throwing bit of code, and then run doctests on the repo, which will complain that it comes to a different conclusion because the error formatting is different:

src/Data/Error.hs:195: failure in expression `unwrapIOError $ Left (newError "oh no!")'
expected: oh no!
 but got: *** Exception: oh no!

that is the eval plugin produced expected: oh no!, but doctests will produce *** Exception: oh no! and thus report an error when running.

The solution might be as easy as adding *** Exception: to the beginning of every displayException string.

Profpatsch added a commit to Profpatsch/error that referenced this issue Nov 15, 2021
The hls eval plugin produces different text than what doctest expects:
haskell/haskell-language-server#2353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants