clj-stacktrace icon indicating copy to clipboard operation
clj-stacktrace copied to clipboard

Printing out unbalanced parens causes NullPointerException

Open yayitswei opened this issue 13 years ago • 5 comments

See https://github.com/emezeske/lein-cljsbuild/issues/178#issuecomment-12690982

Something like this

(on $body :click :#a nil
    (fn [e]
      (log "test";;)
      )
    )

would trigger it.

yayitswei avatar Jan 25 '13 08:01 yayitswei

I should be able to run a debug build of lein-cljsbuild this weekend to capture the exact stack trace that the ClojureScript compiler is throwing in the above instance. It seems that something in the trace is giving clj-stacktrace some trouble.

emezeske avatar Jan 25 '13 17:01 emezeske

I was wondering if there's any progress/workaround for this issue. This essentially makes lein-cljsbuild unusable for me in auto mode, as it crashes every time there's a compile error.

Though I get the impression that not everyone sees this exception.

byw avatar Mar 30 '13 16:03 byw

I found a workaround by cloning clj-stacktrace as a checkout dependency under my project. (ie. clone into /checkouts/ )

Looking at the dependencies, cljsbuild 0.3.0 depends on clj-stacktrace 0.2.5, which is what shows in HEAD. Perhaps there are commits that haven't been published?

byw avatar Mar 30 '13 17:03 byw

Weird, from what I can tell, 0.2.5 contains the latest commits (in fact, changing the version number to 0.2.5 was itself the most recent commit).

Regarding why more people are not complaining about this: I think a lot of people use Paredit or something equivalent, so it's rather difficult to ever save a ClojureScript file with unbalanced parenthesis.

emezeske avatar Mar 31 '13 01:03 emezeske

I use Paredit myself. In the relatively rare case when I save an unbalanced file, this bug is somewhat annoying, especially if I don't notice that cljs-build has crashed.

yayitswei avatar Mar 31 '13 02:03 yayitswei