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

Remove extra error metadata that appears in the stacktraces for Clojure 1.10 #609

Open
bbatsov opened this issue May 5, 2019 · 9 comments

Comments

@bbatsov
Copy link
Member

bbatsov commented May 5, 2019

In Clojure 1.10 there's some extra info displayed in the stackframes. See this:

image

The maps with the error info and the spec failure are basically white noise and should probably be removed, although we might want to extract some info from the spec failure metadata.

See also the related clojure-emacs/cider#2443

@jeffvalk @clojure-emacs/cider Any thoughts/suggestions here?

@alexander-yakushev
Copy link
Member

I'm all for it 😄

Can we perhaps call ex-triage if running Clojure 1.10+?

@bbatsov
Copy link
Member Author

bbatsov commented May 5, 2019

Yeah, I think that's a good idea. In general there's a bit of work to be done with respect to error handling as after 1.10 we still have no compilation highlights and you can no longer click on error messages in the REPL. Probably there we should move to getting the info from *e or the middleware response instead of parsing strings that can change. Anyways, that's not directly related to this ticket.

@suvratapte
Copy link

Hi @bbatsov,

I was able to remove the white noise from clojure.spec.
Attaching a screenshot of cider-error when evaluating (let [1]) with Clojure 1.10.1.

Screenshot 2020-02-17 at 4 01 04 PM

What information from clojure.spec.alpha do you think is useful? I think that :pred is certainly useful. How should we display it?

From clojure.error, I think :phase and :symbol are useful. What do you think?

@Cartmanishere helped me with this. 😄

@bbatsov
Copy link
Member Author

bbatsov commented Feb 18, 2020

Thanks for tackling this! 🙇

What information from clojure.spec.alpha do you think is useful? I think that :pred is certainly useful. How should we display it?

My original intention was to hide all the info from the maps and potentially show the important info in some way that fits better the UI.
Potentially all the info in the error maps is useful, but the real problem is that those maps don't fit very well the stack frames. I'm wondering if we can just add some button that people can press to expand the data in the stacktrace maps.

@suvratapte
Copy link

Hmm, I agree. I will think about where it can go in the UI.
Do we have any UI mocks for this? Or other places where we use such buttons?

@bbatsov
Copy link
Member Author

bbatsov commented Feb 20, 2020

You can see such a button in the *nrepl-messages* buffer.

@suvratapte
Copy link

suvratapte commented Feb 27, 2020

@bbatsov : I looked at the buttons in *nrepl-messages* buffer.
Would a toggle (like the ones here: Hide: Clojure Java REPL Tooling Duplicates) work? In my opinion, a toggle would fit better than the expanding buttons on *nrepl-messages* buffer.
I don't know what the name of the toggle should be though. Spec maybe?

@bbatsov
Copy link
Member Author

bbatsov commented Feb 27, 2020

I think that's a great idea! We should have thought of this earlier.

Spec maybe?

Sounds good!

@suvratapte
Copy link

Cool. Will begin work on this after 3rd March.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants