error-message-catalog

eggsyntax 2016-04-30T00:05:08.000033Z

Cool, I’ll go that route for now.

tolitius 2016-04-30T00:06:52.000034Z

yea, if an exception / error already exists its cause (if different) should be just added to the .md

eggsyntax 2016-04-30T00:07:00.000035Z

That would mean that ## [Title] and ### Error Message are essentially the same thing, and should maybe be collapsed into one thing — unless the idea is that title be an informal description of the precise exception named in “error message”.

tolitius 2016-04-30T00:07:15.000036Z

brings a good point that ## Cause should be plural from the start

tolitius 2016-04-30T00:08:15.000037Z

might not even need the title then, yea

eggsyntax 2016-04-30T00:08:28.000038Z

Note also that the example page suggested in the readme (namely https://github.com/eggsyntax/clojure-error-message-catalog/blob/master/lib/mount/derefablestate-cannot-be-cast-to-ifn.md ) follows the other pattern (assuming there can be other causes of that error, and I would somewhat expect so).

tolitius 2016-04-30T00:09:01.000041Z

yep

tolitius 2016-04-30T00:09:09.000042Z

we are just shaping things up

tolitius 2016-04-30T00:09:13.000043Z

with your help :simple_smile:

tolitius 2016-04-30T00:09:20.000044Z

we'll need to update this: https://github.com/yogthos/clojure-error-message-catalog#error-file-format

eggsyntax 2016-04-30T00:09:24.000046Z

One other idea: maybe it’d be worth having a “java” subdir at the same level as “clj” and “cljs”.

yogthos 2016-04-30T00:10:04.000047Z

yeah I think that makes sense

eggsyntax 2016-04-30T00:10:12.000048Z

@tolitius: oh, totally, I’m expecting everything to be rough, I just thought I’d contribute one right away, and pointing stuff out as I see it.

yogthos 2016-04-30T00:10:17.000049Z

cause some exceptions will be interop specific

yogthos 2016-04-30T00:10:57.000050Z

I could also add you to the project if you're interested

eggsyntax 2016-04-30T00:11:01.000051Z

Or may raise java exceptions, I think, even if not explicitly interop.

yogthos 2016-04-30T00:11:05.000052Z

I think more hands on deck will definitely help :simple_smile:

eggsyntax 2016-04-30T00:11:45.000053Z

Sure, by all means add me! My availability to contribute will be pretty intermittent, but I think it’s an excellent idea and I definitely want to help out at least a bit :simple_smile:

yogthos 2016-04-30T00:12:57.000054Z

it would probably be good to look at the exceptions we've got in a week or so, and take another look at how to classify them

eggsyntax 2016-04-30T00:13:10.000055Z

Seems like a good idea.

yogthos 2016-04-30T00:13:47.000056Z

ideally it would be nice to be able to parse the md files into structured data at some point

yogthos 2016-04-30T00:14:26.000057Z

that would require that all files follow a strict format though, so prs would have to be curated with extra care

eggsyntax 2016-04-30T00:15:26.000058Z

For sure. And yeah, I think that’s where this starts to really pay off big — could have a lein plugin, for example, that appends a link to the appropriate page to every error thrown.

yogthos 2016-04-30T00:15:56.000059Z

yeah that would definitely be fancy :simple_smile:

eggsyntax 2016-04-30T00:16:02.000060Z

And/or there could be a “friendly message” section which could also get appended.

eggsyntax 2016-04-30T00:16:20.000061Z

Or just one way or another, make it available to people at the time they hit the error.

yogthos 2016-04-30T00:17:32.000062Z

another nice side effect would be that it could help inform clojure core team as well as library maintainers on what's tripping people up

eggsyntax 2016-04-30T00:18:19.000063Z

Absolutely. Could even give them an easy route to improving the situation by absorbing all or part of the project.

yogthos 2016-04-30T00:18:36.000064Z

yup

eggsyntax 2016-04-30T00:45:28.000065Z

Went ahead & created a PR from my fork for now; would appreciate any feedback. Thanks! https://github.com/yogthos/clojure-error-message-catalog/pull/15

cfleming 2016-04-30T02:06:11.000067Z

Yeah, I’m actually wondering whether the best solution would be a ClojureDocs style site with an API.

cfleming 2016-04-30T02:06:31.000068Z

I’d love to be able to programmatically access the data from Cursive.

cfleming 2016-04-30T02:07:10.000069Z

I haven’t thought much about it yet, but currently I’d have to parse all the markdown into some structure I could use.

cfleming 2016-04-30T02:08:07.000070Z

Another thing that might be interesting (not sure how useful/general it would be though) would be to be able to indicate which frame in the stacktrace is actually responsible for the error, if that can be determined.

cfleming 2016-04-30T02:08:32.000071Z

I could then use that to provide a suggested link to the user.

cfleming 2016-04-30T02:09:17.000072Z

I’ll look at that Scala page when I get a chance, since I’d like to do a clippy-style thing by pattern matching over known errors.

eggsyntax 2016-04-30T02:10:12.000073Z

“Cursive Clippy” would be highly amusing 😄

cfleming 2016-04-30T02:10:47.000074Z

I’m going to put a request up on 99 designs for some cute mascot :simple_smile:

👏 1
cfleming 2016-04-30T02:11:20.000075Z

“Hi, it looks like your stack is overflowing. Have you considered calling fewer functions?"

eggsyntax 2016-04-30T02:11:53.000076Z

Hahaha! At this point I’m going to be really disappointed if that never happens.

eggsyntax 2016-04-30T02:13:35.000077Z

As far as I understand, btw — I just ran across the project today myself — the idea for the moment is to have a submission format that makes it as easy as possible for people to add new exception pages, while still being formalized enough (w/ fixed section titles) to later parse into something more easily machine-readable.

eggsyntax 2016-04-30T02:14:31.000079Z

There’s some discussion of that in https://github.com/yogthos/clojure-error-message-catalog/issues/6

cfleming 2016-04-30T02:15:39.000081Z

The nice thing about having an api would be that submission could be automated from Cider/Cursive.

cfleming 2016-04-30T02:15:57.000082Z

With a form for the fields we’d like information on.

eggsyntax 2016-04-30T02:15:58.000083Z

One big win on the Scala Clippy project is having a website to make submissions even easier (& could use several separate form fields to ensure format-correctness). I’m definitely hoping that’s where this project will end up going.

eggsyntax 2016-04-30T02:16:15.000084Z

Automated submission from CIDER/Cursive would definitely be another big win IMO

cfleming 2016-04-30T02:16:41.000085Z

Yeah, I think that will become necessary. It’s not so critical for the Elm project because they’re manually looking at cases, and actually fixing them in the compiler.

cfleming 2016-04-30T02:16:49.000086Z

Sadly that doesn’t look like it will happen for Clojure.

cfleming 2016-04-30T02:17:08.000087Z

At least the macro errors should be improved in 1.9, with a bit of luck.

eggsyntax 2016-04-30T02:19:39.000088Z

If most of the tooling around clj/s can offer friendlier error messages on request, derived from this project, I think that’ll be nearly as useful as getting them into the compiler.

cfleming 2016-04-30T02:20:06.000090Z

It’s the next best thing, certainly.

eggsyntax 2016-04-30T02:22:46.000091Z

In the 2015 State of Clojure survey, on the question "What has been most frustrating or has prevented you from using Clojure more than you do now?," "Error Messages” was by far the most common answer, so clearly the need is pretty great.

yogthos 2016-04-30T02:32:03.000095Z

I still would like to keep pushing to improve compiler messages as well

yogthos 2016-04-30T02:32:39.000096Z

Alex mentioned that he’s working on that for 1.9 release, so I’m looking forward to that, but I think that needs to be an ongoing effort

yogthos 2016-04-30T02:33:03.000097Z

but even outside errors in the core, there are also library errors, and I think that’s just as important

yogthos 2016-04-30T02:33:13.000098Z

and those can be fixed right now by the maintainers

yogthos 2016-04-30T02:33:47.000099Z

so if there was an automated submission process, that would definitely help aggregate errors

yogthos 2016-04-30T02:34:16.000100Z

it would be really nice to be able to count duplicate submissions as well, that way you could see what errors people get tripped up on most often

eggsyntax 2016-04-30T02:44:32.000101Z

Seems like it might be worth bringing Alex’s attention to this project soon, in case there’s some coordination step that would make (possible) integration into core easier at some future date.

eggsyntax 2016-04-30T02:46:29.000102Z

One cool idea the Scala folks had (not for immediate implementation, but long-run) was to show all duplicate answers in one place & let them be voted up or down, stack-overflow-style. That could leave room for answers to get better & better without a lot of attention from project devs.

eggsyntax 2016-04-30T02:49:32.000103Z

Probably not important or feasible until the project reaches the point of having several submissions for many of the errors.