r/Clojure • • Aug 11 '18

Error message improvements in Clojure 1.10

https://mobile.twitter.com/puredanger/status/1028103654241443840
89 Upvotes

41 comments sorted by

View all comments

4

u/clj_user Aug 11 '18

It looks almost exactly the same. And I'd love to see a comparison to 1.8, before spec, and before the messages got worse.

22

u/alexdmiller Aug 11 '18

There are several important differences.

  • execution phase is identified (reading, macroexpand, compile, etc)

  • macroexpansion errors report the location in macro call rather than in the macro impl

  • compile or macroexpand symbol is identified

  • unuseful details are suppressed when not useful (cause class, source file in repl)

  • spec errors are not spamming full ex-data into the message

You can’t see it here but all compile errors also now carry ex-data which is available to tools.

1.8 is almost the same as 1.9 for these as there is only 1 spec example here.