cuttle icon indicating copy to clipboard operation
cuttle copied to clipboard

collect list of all the possible CLJS compile errors

Open oakmac opened this issue 10 years ago • 3 comments

Would be helpful to have a list of all the possible CLJS compiler errors. I'm sure the verbage of these will be a moving target as work is done on the compiler, but I don't think it would be too much work to keep it in sync.

Any help appreciated here.

oakmac avatar Oct 17 '14 23:10 oakmac

Warnings are cleanly listed here in the cljs analyzer.

They are labelled as "errors", but they are warnings.

shaunlebron avatar Oct 17 '14 23:10 shaunlebron

Error messages are sprinkled through the ClojureScript and Clojure code bases as throw expressions, as far as I can tell currently:

  • tools.reader - (reads forms) - look for throw expressions
  • cljs analyzer - (validates cljs forms) - see all calls to the error function to get some analyzer errors, but notice how wrapping-errors will catch all exceptions and produce analyzer errors from them
  • cljs tagged literals - look for throw expressions
  • cljs core - (validates cljs macros) - like for the throw expressions
  • clj core - (validates clj macros, yup, used by cljs) - look for the throw expressions

I think that covers where the language-level errors, not sure though

shaunlebron avatar Oct 18 '14 00:10 shaunlebron

FYI - have started collecting error messages from the compiler in the 00-scrap/compiler-errors folder

oakmac avatar Oct 18 '14 14:10 oakmac