This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-24
Channels
- # babashka (19)
- # beginners (43)
- # calva (10)
- # clj-kondo (3)
- # cljsrn (8)
- # clojure (106)
- # clojure-europe (8)
- # clojure-hungary (5)
- # clojure-nl (1)
- # clojure-uk (1)
- # clojurescript (14)
- # core-typed (1)
- # graalvm (2)
- # graphql (1)
- # malli (2)
- # membrane (9)
- # observability (2)
- # off-topic (66)
- # polylith (3)
- # practicalli (3)
- # re-frame (17)
- # reagent (3)
- # remote-jobs (7)
- # rewrite-clj (17)
- # sci (29)
- # shadow-cljs (45)
- # sql (5)
- # tools-deps (15)
- # vim (8)
Hey I'm having a wired exception. It is probably something with localstate, like removing .m2 .gitlibs should fix it But it's a crypt exception, I think that we can try to understand and improve this error message. At least, know which file cause this exception https://gist.github.com/souenzzo/7ab1a37ad172efef71a6765b13413704
@souenzzo My first thought was that it might be a version conflict on org.clojure/data.xml
in your environment, since it says that a Var in that lib isn't defined -- but when I looked at blame on clojure.data.xml
that element-nss
has been in there for six years at this point so that theory doesn't seem terribly likely.
Did you succeed in making the error go away? Can you reproduce it?
Could there be an 0.0.8 version of data.xml
in your transitive dependencies? That didn't have those Vars (but it didn't have some of the same namespaces at all).
(some #{"/home/souenzzo/.m2/repository/org/clojure/data.xml/0.2.0-alpha6/data.xml-0.2.0-alpha6.jar"}
(string/split (System/getProperty "java.class.path")
#":"))
=> "/home/souenzzo/.m2/repository/org/clojure/data.xml/0.2.0-alpha6/data.xml-0.2.0-alpha6.jar"
Yeah, having tools.build
be "in addition" instead of "replacing" can lead to some problematic situations, but mostly around tools.deps.alpha
in our experience.
That's why we run tests in a subprocess and avoid having our code on the classpath when using tools.build
.
I'd have to see more of your deps.edn
file and how you're invoking the build script to be able to provide any more specific feedback, I suspect.
@jgomo3 Saw your post on ClojureVerse -- if you hop into #tools-deps here, you can get more "real-time" assistance on tools.build
etc.
@seancorfield I've seen today one of your talks from the Jan this year about REPL development. It included demoing of Reveal and add-libs. The idea of adding libs in a runtime is so nice, but I've got a question. How do you deal with adding newer version of libs? Or loading a fork?
Today I had this issue that I loaded a lib from github, then I forked it, modified it, updated deps with my fork, called add-libs
on updated deps, but at the end, I still had the old version at hand.
Also, when I checked (:libs (clojure.tools.deps.alpha.repl/current-basis))
it still contained the info about the old dep. At the end I had to restart REPL as usual, but it would be nice to keep it on if possible. How do you tackle this kind of issue?
You can't add a newer version of a library you have already loaded, without starting a new isolated Clojure instance (which you can do without restarting the JVM but it's non-trivial). If I'm iterating on a library locally for which I have the source, I just use "load file" in my editor and eval every form I change -- that will override any previously loaded (older) version, just like evaluating any other source code.
I don't find I need to update libraries all that often while I'm actually developing.
Ok, that is actually not the bad idea. The IDE can fetch new deps, and then you can reload necessary files.
It feels like it's taken me a long time to settle on a nice workflow in the REPL. I'm very productive with it now and my REPLs all tend to be long-lived at this point (often weeks, sometimes months).