This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-13
Channels
- # aleph (2)
- # announcements (1)
- # beginners (133)
- # cider (29)
- # cljdoc (9)
- # cljs-dev (2)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (146)
- # clojure-dev (26)
- # clojure-europe (3)
- # clojure-italy (26)
- # clojure-japan (6)
- # clojure-nl (76)
- # clojure-spec (4)
- # clojure-uk (42)
- # clojurescript (17)
- # cursive (43)
- # datascript (1)
- # datomic (28)
- # emacs (4)
- # figwheel-main (13)
- # fulcro (26)
- # hyperfiddle (2)
- # jobs (9)
- # jobs-discuss (6)
- # leiningen (1)
- # mount (5)
- # onyx (8)
- # pathom (5)
- # pedestal (2)
- # re-frame (52)
- # reagent (21)
- # reitit (58)
- # ring-swagger (24)
- # shadow-cljs (95)
- # sql (14)
- # test-check (10)
- # yada (18)
@alexmiller thanks for fixing CLJ-2427 🙂
I have a query/question about some of the new error messages
If I use a namespace without requiring it, or use an alias without adding it to a require, I get an error which is a syntax error
#error{:cause "",
:via [{:type clojure.lang.Compiler$CompilerException,
:message "Syntax error compiling at (<myfile>.clj:127:1).",
:data #:clojure.error{:phase :compile-syntax-check,
:line 127,
:column 1,
:source "<myfile>.clj"},
:at [clojure.lang.Compiler load "Compiler.java" 7649]}
{:type java.lang.ClassNotFoundException,
:message "",
:at [java.net.URLClassLoader findClass "URLClassLoader.java" 381]}],
:trace [[java.net.URLClassLoader findClass "URLClassLoader.java" 381]
[clojure.lang.DynamicClassLoader findClass "DynamicClassLoader.java" 69]
...
I was surprised that it was a syntax error. I think of syntax errors as problems where the code is not well-formed and is syntactically incorrect
Using a namespace without requiring it seems like an error, but seems like maybe a different class of error?
yeah, so the Compiler is not very disciplined right now about which exception types it uses
we have two phases defined - :compile-syntax-check and :compilation
Yeah, was thinking it was more about the phases
at the moment, everything is being reported as :compile-syntax-check
but if you look carefully, the Compiler code throws a variety of exception types with no correlation to these two kinds of errors
this particular case is one where getting a :compilation phase error would make more sense
and in that case, you should get a different message (I can’t remember but I think the code for that is there already)
so I have a todo to go through and make the compiler more disciplined about this, but I’m not going to do it for 1.10
k, no JIRA ticket needed then?
or is it a helpful example?
oh, I should probably make a generic one
it’s pretty easy to look at the code with this eye and separate
so I’d rather have one generic ticket than a zillion specific ones
Just re-read my messages, https://clojurians.slack.com/archives/C06E3HYPR/p1542142399247200 was meant to be a separate statement, not specifically asking for you to look at it
Though I can see how that wasn't very clear
I normally try not to @ mention anyone in specific for a question like that
I’ve got enough keyword triggers set up that I got a notification on it anyways :)
and I try to always read this room regardless