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

optional include location of the spec error in the message. #241

Open
drewverlee opened this issue Jul 26, 2022 · 2 comments
Open

optional include location of the spec error in the message. #241

drewverlee opened this issue Jul 26, 2022 · 2 comments

Comments

@drewverlee
Copy link

When i'm reading expound formatted spec errors it's usually very clear what the issue is, it's not immediately clear where the error is. This information: the filename, and possible the row and column. Is in the raw spec error output as well as the SO, but they can be far from the expound message. In the case of the raw spec error, is just a big clojure map that's tiresome to parse.

My suggestion is to either always include that information nearby so it's easy to find. Maybe something like:

-- Spec failed --------------------

  1

should satisfy

  string?

Found in foo.main:67:3:2
-------------------------

I'm not really sure what the UI should be exactly. maybe even in the header like:

-- Spec failed at foo.main:67:3:2 --------------------

@bhb
Copy link
Owner

bhb commented Jul 26, 2022

@drewverlee Thanks for the idea! I'll look into it.

@bhb
Copy link
Owner

bhb commented Oct 11, 2022

@drewverlee Sorry for the delay here! I've had a bunch of other stuff going on.

This is a cool idea, but AFAICT, the data that is passed to expound (the result of s/explain-data) doesn't appear to include this line number information.

I may be missing something, though! Can you provide more context on your setup e.g. when expound is invoked?

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