Fork me on GitHub
#clerk
<
2023-02-02
>
emilaasa06:02:17

I have an issue that's maybe not related to clerk, but maybe someone has run into it here? When I require clerk in most my projects, everything works is stunning! But after adding certain libraries to my notebook projects, I get an error like this when trying to require clerk:

; (err) Execution error (NoClassDefFoundError) at java.lang.Class/forName0 (Class.java:-2).
; (err) Could not initialize class clojure.tools.analyzer.jvm__init
I believe this has something to do with my local libraries (they are provided to the local maven repo by running lein install). Anybody have suggestions on how to proceed with figuring out the problem?

mkvlr06:02:51

sounds like a classpath conflict with tools.analyzer

mkvlr06:02:42

I would first try if the problem goes away if you declare a top level dep on tools analyzer (and jvm)

jumar07:02:53

^ That, plus you should also look deeper in the stacktrace to see if the actual problem is reported there.

emilaasa12:02:40

Thanks! I've done the following: 1. Nuked my ~/.m2/repository folder for good measure 2. Verified I can start clerk without my library 3. re-provoked the error, this is the trace: https://gist.github.com/emilaasa/6639aacbdb3d4df1abdea9d32e1a0a92 4. added the top level deps as mkvlr suggested But the issue persists. I don't really know how to interpret the stack trace. Any ideas would be welcome šŸ™‚

jumar13:02:52

That's weird. Afaict, there's nothing more really in the stacktrace. I would try to clean up any project caches (`lein clean` or equivalent) and make sure to remove all the extra global dependencies (from ~/.lein/profiles.clj )

mkvlr17:02:53

can you paste your classpath / library tree?

Sam Ritchie18:02:10

@jaydeesimon here is a first take on docs for how to do custom ClojureScript, and how to extend the SCI environment: https://clerk-utils.mentat.org/#custom-clojurescript-builds

ā¤ļø 10
4
Sam Ritchie22:02:39

this is now in mainā€¦ if it looks good I will do a release. Then the next step is to add ā€œhow to use with Clerkā€ guides to all of these other projectsā€¦

Sam Ritchie22:02:26

@jaydeesimon lmk if you get this working and have any suggestions, Iā€™ll get those in before release

jaydeesimon23:02:15

Just had a read and looks good to me!

jaydeesimon23:02:01

Unfortunately, I didn't have time to work on getting @nivo/line working in my sample repo but hoping to get some time tomorrow Edit: my wife put the baby to bed so snuck in some time and https://clojurians.slack.com/archives/C035GRLJEP8/p1675387103714179?thread_ts=1675271575.764119&amp;cid=C035GRLJEP8 šŸ˜ˆ

Sam Ritchie01:02:12

Haha Iā€™ve been there my friend, get some sleep!

šŸ˜ 2