This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-12
Channels
- # announcements (4)
- # babashka (60)
- # beginners (3)
- # calva (15)
- # cherry (1)
- # clojars (9)
- # clojure (30)
- # clojure-denmark (5)
- # clojure-europe (23)
- # clojure-losangeles (1)
- # clojure-norway (8)
- # clojurescript (49)
- # core-async (3)
- # cursive (15)
- # datomic (4)
- # deps-new (1)
- # emacs (36)
- # figwheel-main (3)
- # fulcro (16)
- # girouette (2)
- # hyperfiddle (1)
- # introduce-yourself (3)
- # lambdaisland (6)
- # nrepl (23)
- # off-topic (7)
- # pedestal (10)
- # polylith (50)
- # practicalli (1)
- # releases (2)
- # sci (16)
- # shadow-cljs (27)
- # slack-help (3)
- # sql (17)
- # tools-deps (5)
I'm experiencing an issue in one of our projects at work with running on WSL. If I use ns-publics
on various namespaces, I can see that they are loaded and everything looks fine, but if I run use
on said namespaces with :reload
I get Could not locate blahblah on classpath.
This is not an issue when running natively on Windows. Any ideas what can be wrong?
You don't need to use use
with :reload
btw, you can just use use
once and then use (require '[foo] :reload)
`Execution error (FileNotFoundException) at repl/eval39609 (REPL:1). Could not locate openid/core__init.class, openid/core.clj or openid/core.cljc on classpath.`
or.. output of wsl.exe --version
shows: WSL-versjon: 1.1.6.0
but that is the version of the cli I guess
if you can make a repro I could test this later today on my windows machine, gotta go out now
it is like everything is loaded into memory, but everything on the classpath is blown away after I reach the repl prompt
My guess is you have something that is scanning the filesystem for .clj files, and then just feeding the contents to eval (rather than loading via require)
Which would create the namespaces in your ns forms, even if those didn't match the file paths, which they have to do for require to work
And maybe a reason files and namespaces match under windows, but not match in wsl is file case sensitivity
This case piqued my interest even if it's solved by now. If I specified org.clojure/data.xml {:mvn/version "0.0.8"}
instead of org.clojure/data.xml {:mvn/version "0.2.0-alpha8"}
in a project that performed (:import clojure.data.xml.node.Element)
, the underlying java
execution would immediately exit, with no error message. Would happen both under Lein and tools.deps.
I found it pretty surprising behavior for java
- shouldn't one at least get an error message?
(I recall at least one other way of triggering similar behavior: specifying a non-existing lib under the agentpath
)
% clj -Sdeps '{:deps {org.clojure/data.xml {:mvn/version "0.0.8"}}}' -M -e "(import 'clojure.data.xml.node.Element)"
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
clojure.data.xml.node.Element
Full report at:
/tmp/clojure-2092397417642504981.edn
zsh: exit 1 clj -Sdeps '{:deps {org.clojure/data.xml {:mvn/version "0.0.8"}}}' -M -e
%
seems like you have something else going onHi all - I’m hoping someone can point me to an example of passing state into pedestal so it will be available in all functions associated with routes - tutorials or docs etc - thanks!
You might get a better response over in #C0K65B20P