This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-24
Channels
- # adventofcode (2)
- # anglican (1)
- # announcements (4)
- # aws (2)
- # babashka (28)
- # beginners (18)
- # brompton (3)
- # calva (22)
- # clj-kondo (2)
- # cljdoc (29)
- # clojure (41)
- # clojure-europe (28)
- # clojure-gamedev (14)
- # clojure-nl (2)
- # clojure-spec (2)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (53)
- # css (3)
- # cursive (6)
- # duct (3)
- # emacs (5)
- # fulcro (29)
- # introduce-yourself (1)
- # liberator (5)
- # lsp (1)
- # malli (11)
- # meander (4)
- # nbb (11)
- # off-topic (17)
- # pathom (2)
- # polylith (8)
- # practicalli (1)
- # react (6)
- # reagent (11)
- # releases (2)
- # rewrite-clj (11)
- # shadow-cljs (59)
- # tools-deps (21)
- # vim (11)
anyone know what might be causing this kind of error, when invoking clojure -X:deps prep
Cloning:
Checking out: at 1e7c019730dc6f9e38793170c8801c5950516b60
Downloading: org/clojure/tools.namespace/1.0.0/tools.namespace-1.0.0.pom from central
Downloading: org/clojure/tools.namespace/1.0.0/tools.namespace-1.0.0.jar from central
Execution error (IOException) at java.lang.ProcessImpl/forkAndExec (ProcessImpl.java:-2).
error=2, No such file or directory
more context in threadthis is running inside a Docker image which itself is running via a GitHub action, so there is some degree of virtualized craziness going on. Clojure itself is being installed, via:
# install clojure version needed for Metabase
curl -O
chmod +x linux-install-1.10.3.933.sh
./linux-install-1.10.3.933.sh
I also couldn’t quite figure out how to tell it to spit out the command it’s trying to fork and exec
are you using compile-clj?
if so, that's the most likely culprit as it forks a jvm to run the compile, and my best guess is that the directory it's trying to do that in doesn't exist
I’m not sure… I never explicitly call such a command from this script
@U0183EZCD0D Do you know what "prep" your dependencies have declared? That would at least tell you what it is trying to run.
@U064X3EF3 Is there some hidden "verbose" or debug flag that could be turned on here to help?
I’m afraid I still haven’t grokked deps enough to be able to understand that question 😞
actually, I figured it out, that java
is not on $PATH
apparently
{:type java.io.IOException,
:message
"Cannot run program \"java\" (in directory \"/app/source/java\"): error=2, No such file or directory",
:at [java.lang.ProcessBuilder start "ProcessBuilder.java" 1128]}
For the future, you'd be looking for :deps/prep-lib
in deps.edn
in one or more of the dependencies, which tells -X:deps prep
what code needs to be run.
sorry I was in a meeting
I have not (yet) added any debugging here, but there is a lot of stuff that gets spit into the temp directory where this is happening and on error, it is left so you can examine the entrails
this one?
Full report at:
/tmp/clojure-5839141627426774183.edn
that's a separate thing, but also useful
that's the error reporting output from clojure.main
user=> (import [java.nio.file Files] [java.nio.file.attribute FileAttribute])
user=> (.toString (.toFile (Files/createTempDirectory "compile-clj" (into-array FileAttribute []))))
"/var/folders/_4/rhwlxzf92fj4727zsjk8xjtw0000gp/T/compile-clj17809906038309626783"
should show you approximately the directory where it's happening (the number at the end will be different, but just look for the newest directory and that will have some stuff in it
there should be a compile.clj script there, and a compile.cp classpath file
although I don't think either would help you with the problem above
right, yeah, this ended up just being something silly. I appreciate the pointers, though, which I will consult next time. thanks to both of you!