Certain kinds of errors during startup leaves developer with no clues as to what is wrong
Description
My :dev alias includes an extra path that has a user.clj in it. Various problems originating in this file causes the following output:
``` clojure -A:dev 2018-10-25 11:05:01.606:INFO::main: Logging initialized @11603ms Exception in thread "main" java.lang.ExceptionInInitializerError at clojure.main.<clinit>(main.java:20) ```
Examples of problems that cause this:
`:require` dependencies that are not on the class path
Syntax errors in user.clj
`:require` deps not on class path from any transitive dependency
Syntax errors in transitive deps
Code in `user.clj` that runs on load and somehow fails
Some of these problems can be mitigated with a try/catch, which allows me to print a stack trace and, e.g.:
``` clojure -A:dev 2018-10-25 11:12:39.622:INFO::main: Logging initialized @10851ms #error { :cause Could not locate yonatane/timbre_json__init.class, yonatane/timbre_json.clj or yonatane/timbre_json.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. :via ... ```
However, many kinds of errors still result in the one-line stack trace. This problem is exacerbated by the fact that it only occurs on REPL startup - the problem may have been introduced hours previous, and backtracking may not be trivial.
Environment
clojure-tools-1.9.0.397 and Clojure 1.10.0-beta4
Activity
Alex Miller December 19, 2018 at 5:41 PM
This is actually a Clojure bug that was introduced in 1.10.0-alpha7 and fixed in 1.10.0-beta6. See CLJ-2427.
My :dev alias includes an extra path that has a user.clj in it. Various problems originating in this file causes the following output:
```
clojure -A:dev
2018-10-25 11:05:01.606:INFO::main: Logging initialized @11603ms
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
```
Examples of problems that cause this:
`:require` dependencies that are not on the class path
Syntax errors in user.clj
`:require` deps not on class path from any transitive dependency
Syntax errors in transitive deps
Code in `user.clj` that runs on load and somehow fails
Some of these problems can be mitigated with a try/catch, which allows me to print a stack trace and, e.g.:
```
clojure -A:dev
2018-10-25 11:12:39.622:INFO::main: Logging initialized @10851ms
#error {
:cause Could not locate yonatane/timbre_json__init.class, yonatane/timbre_json.clj or yonatane/timbre_json.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
:via
...
```
However, many kinds of errors still result in the one-line stack trace. This problem is exacerbated by the fact that it only occurs on REPL startup - the problem may have been introduced hours previous, and backtracking may not be trivial.