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 the display of error messages #581

Closed
ndmitchell opened this issue Apr 10, 2018 · 5 comments
Closed

Improve the display of error messages #581

ndmitchell opened this issue Apr 10, 2018 · 5 comments

Comments

@ndmitchell
Copy link
Owner

Currently you might get:

Error when running Shake build system:
* Main.exe
* Development/Shake/Internal/Shake.o
* Development/Shake/Internal/Shake.o Development/Shake/Internal/Shake.hi
here
CallStack (from HasCallStack):
  error, called at src\Test\Self.hs:65:9 in main:Test.Self

Straw man proposal:

Error when running Shake build system:
* Starting from: Main.exe
  With rule declared at src\Test\Self.hs:45
* Depends on: Development/Shake/Internal/Shake.o
  With rule declared at src\Test\Self:56
* Depends on: Development/Shake/Internal/Shake.o Development/Shake/Internal/Shake.hi
  With rule declared at src\Test\Self:72
* Which raised the error:
here
CallStack (from HasCallStack):
  error, called at src\Test\Self.hs:65:9 in main:Test.Self

Suggestions for tweaks most welcome, e.g. from @snowleopard who got confused by this in snowleopard/hadrian#562.

@snowleopard
Copy link
Contributor

@ndmitchell I like this! Definitely an improvement.

Dancing slashes add a bit of distraction -- can you point them in one direction?

@ndmitchell
Copy link
Owner Author

Good idea about the slashes

@ndmitchell
Copy link
Owner Author

It's now improved, but still not perfect:

*Test> :main errors chain.3
Longest file modification time lag was 3ms
## BUILD errors chain.3
Error when running Shake build system:
  at src/Test/Type.hs:51:46-55:
  at src/Test/Type.hs:51:46-55:
* Depends on: chain.3
  at src/Development/Shake/Internal/Derived.hs:94:5-15:
* Depends on: chain.2
* Raised the exception:
err_chain
CallStack (from HasCallStack):
  error, called at src\Test\Errors.hs:91:30 in main:Test.Errors

@ndmitchell
Copy link
Owner Author

The duplicate at lines at the start were valid - want calls both action (is tracked) and apply (is tracked). I have the stack omit them though so it looks prettier.

@snowleopard
Copy link
Contributor

Thanks! I'm sure this will help.

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

No branches or pull requests

2 participants