This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-29
Channels
- # announcements (6)
- # babashka (7)
- # beginners (24)
- # calva (2)
- # cider (21)
- # clj-kondo (49)
- # cljdoc (29)
- # clojure (56)
- # clojure-dev (2)
- # clojure-europe (15)
- # clojure-nl (6)
- # clojure-norway (27)
- # clojure-uk (3)
- # clojuredesign-podcast (6)
- # clojurescript (1)
- # conjure (1)
- # core-async (8)
- # cryogen (2)
- # cursive (6)
- # data-science (1)
- # datomic (12)
- # events (1)
- # fulcro (16)
- # graalvm (28)
- # hyperfiddle (2)
- # lambdaisland (4)
- # leiningen (20)
- # observability (1)
- # off-topic (24)
- # pathom (5)
- # pedestal (10)
- # portal (7)
- # practicalli (1)
- # reitit (5)
- # rewrite-clj (20)
- # shadow-cljs (18)
- # vim (8)
- # xtdb (9)
Hi, everyone
This is my project.clj file ... This code is deployed into production and working okay
suddenly today when I tried to do lein do clean, uberjar
it and run it in my local computer
I keep getting this error (I will post the error in the thread)
The problem goes away when I comment out the whole exclusions section but if I don't it keeps getting me the error where he cannot find some file (the namespaces in those dependencies present in the exclusions section)
My leiningen version :
Leiningen 2.11.2 on Java 17.0.10 OpenJDK 64-Bit Server VM
Here's the error I'm getting :
{:clojure.main/message
"Execution error (FileNotFoundException) at hermes.van-buren.baja.commons.pipeline/loading (pipeline.clj:1).\nCould not locate hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core__init.class, hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.clj or hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.\n",
:clojure.main/triage
{:clojure.error/class java.io.FileNotFoundException,
:clojure.error/line 1,
:clojure.error/cause
"Could not locate hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core__init.class, hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.clj or hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.",
:clojure.error/symbol hermes.van-buren.baja.commons.pipeline/loading,
:clojure.error/source "pipeline.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message "Syntax error macroexpanding at (pipeline.clj:1:1).",
:data
{:clojure.error/phase :execution,
:clojure.error/line 1,
:clojure.error/column 1,
:clojure.error/source "pipeline.clj"},
:at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3719]}
{:type java.io.FileNotFoundException,
:message
"Could not locate hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core__init.class, hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.clj or hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.",
:at [clojure.lang.RT load "RT.java" 462]}],
:trace
[[clojure.lang.RT load "RT.java" 462]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$load_one invoke "core.clj" 5928]
[clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
[clojure.core$load_lib invokeStatic "core.clj" 5974]
[clojure.core$load_lib doInvoke "core.clj" 5953]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$load_libs invokeStatic "core.clj" 6016]
[clojure.core$load_libs doInvoke "core.clj" 6000]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$require invokeStatic "core.clj" 6038]
[clojure.core$require doInvoke "core.clj" 6038]
[clojure.lang.RestFn invoke "RestFn.java" 619]
[hermes.van_buren.baja.commons.pipeline$loading__6789__auto____11048
invoke
"pipeline.clj"
1]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3714]
[clojure.lang.Compiler compile1 "Compiler.java" 7748]
[clojure.lang.Compiler compile1 "Compiler.java" 7738]
[clojure.lang.Compiler compile "Compiler.java" 7815]
[clojure.lang.RT compile "RT.java" 411]
[clojure.lang.RT load "RT.java" 457]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6908 invoke "core.clj" 6161]
[clojure.core$load invokeStatic "core.clj" 6160]
[clojure.core$load doInvoke "core.clj" 6144]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5933]
[clojure.core$compile$fn__6913 invoke "core.clj" 6171]
[clojure.core$compile invokeStatic "core.clj" 6171]
[clojure.core$compile invoke "core.clj" 6163]
[user$eval159$fn__168 invoke "form-init1589464848683234846.clj" 1]
[user$eval159 invokeStatic "form-init1589464848683234846.clj" 1]
[user$eval159 invoke "form-init1589464848683234846.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 7194]
[clojure.lang.Compiler eval "Compiler.java" 7184]
[clojure.lang.Compiler eval "Compiler.java" 7184]
[clojure.lang.Compiler load "Compiler.java" 7653]
[clojure.lang.Compiler loadFile "Compiler.java" 7591]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$init_opt invokeStatic "main.clj" 477]
[clojure.main$init_opt invoke "main.clj" 477]
[clojure.main$initialize invokeStatic "main.clj" 508]
[clojure.main$null_opt invokeStatic "main.clj" 542]
[clojure.main$null_opt invoke "main.clj" 539]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause
"Could not locate hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core__init.class, hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.clj or hermes/lib/system/interfaces/m1/disruptor/slot/i_v3/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.",
:phase :execution}}
I ran lein do clean
multiple times and removed the whole ~/.m2
folder multiple times but it doesn't even try to fetch the dependencies in the exclusions ... If I commen out the exclusions section and try again it works fine ...
I mean, that makes sense, when you exclude stuff you get an error that it cannot find a namespace, and when you don't exclude stuff it finds the namespace
Sorry for the delay @U0NCTKEV8
I have defined the excluded library explicitly in the dependencies section. The reason the same dependency is in the :exclusions
is so that other dependencies that may rely on older versions of this library does not overwrite it. That's how we used leiningen for a long time but just after updating to the last version I keep getting this error
Hi everyone, There has been a change in Leiningen :
2.11.0 / 2024-01-27
Top-level :exclusions can now affect top-level :dependencies. (Juan Monetta)
We used the top-level :exclusions
to avoid adding the exclusions for each dependency separately. How can we achieve that now (I couldn't find anything in the docs for this) ?From the description, it doesn't sound to me like those are are incompatible goals. anyway @U0739PUFQ hangs in here, he might know? (Otherwise, slightly hard to get bleeding-edge support there as most maintainers don't hang in here)
yes, that should have said :exclusions now ALSO affects top-level :dependencies
so, top-level :exclusions
just excludes more now
Thanks @U45T93RA6 and @U0739PUFQ
We used the top level :exclusions
to exclude any shared dependencies that may cause conflict ... So there's no way to do that right now other than duplicate those for every dependency ?
:exclusions [
hermes.lib.system.interfaces/m1
hermes.lib.system.components/m1
commons-logging
ch.qos.logback/logback-classic
com.fasterxml.jackson.core/jackson-core
com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
com.fasterxml.jackson.core/jackson-databind
log4j
org.apache.logging.log4j/log4j
org.slf4j/slf4j-simple
org.slf4j/simple
org.slf4j/slf4j-jcl
org.slf4j/slf4j-nop
org.slf4j/slf4j-log4j12
org.slf4j/slf4j-log4j13
]
Thanks a lotyes, it will work exactly the same in that respect
but now you can also exclude a dependency you have directly added on your top level :dependencies vector
so, my commit there was Fix global :exclusions in profile not applying to root :dependencies
Ah thanks @U0739PUFQ... so in other words we were using :exclusions
the wrong way and ... simply having a dependency in the :dependencies
section automatically overrides any indirect deps with conflicting versions
you can add a specific version at the top level to override the transitive ones
that commit fixes a case where you want in your personal profile to exclude something that was added on the project :dependency vector. Before the commit you could exclude things being retrieved transitively by your dependencies, but not the dependencies themselves
it is for a pretty niche use case, let's say you have your own version of a lib, installed under you own group name, that you use for dev (for whatever reason), so want a way on your profile to exclude a lib so you can add yours. You can't overwrite it with a bigger version because the group names are different
Thanks a lot @U0739PUFQ
Yeah I know the use case exactly ... it so happens that I wanted exactly the same functionality while trying out Flow-Storm debugger ... but later on the change caused all our builds failed for repos that used to work for two solid years after updating the leiningen version
Hi everyone, There has been a change in Leiningen :
2.11.0 / 2024-01-27
Top-level :exclusions can now affect top-level :dependencies. (Juan Monetta)
We used the top-level :exclusions
to avoid adding the exclusions for each dependency separately. How can we achieve that now (I couldn't find anything in the docs for this) ?