This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-12
Channels
- # announcements (2)
- # babashka (26)
- # beginners (48)
- # calva (32)
- # cider (23)
- # clj-kondo (61)
- # cljfx (3)
- # clojure (93)
- # clojure-australia (2)
- # clojure-europe (23)
- # clojure-losangeles (1)
- # clojure-nl (5)
- # clojure-uk (4)
- # clojurescript (46)
- # cloverage (9)
- # code-reviews (1)
- # copenhagen-clojurians (1)
- # cursive (39)
- # data-science (6)
- # datahike (8)
- # deps-new (8)
- # depstar (2)
- # etaoin (1)
- # fulcro (2)
- # funcool (2)
- # graalvm (5)
- # jackdaw (3)
- # java (17)
- # jobs-discuss (43)
- # kaocha (2)
- # leiningen (25)
- # malli (8)
- # minecraft (1)
- # missionary (8)
- # observability (6)
- # off-topic (37)
- # other-languages (12)
- # practicalli (1)
- # reagent (4)
- # releases (78)
- # remote-jobs (1)
- # sci (9)
- # shadow-cljs (13)
- # spacemacs (6)
- # sql (1)
- # tools-deps (30)
- # xtdb (3)
I upgraded leiningen today to 2.9.8 (not sure what I had before, some 2.9.x) and suddenly one of my projects started failing when running lein repl
Caused by: java.lang.IllegalAccessError: resolve-var does not exist
...
at clojure.tools.analyzer.jvm$eval68270$loading__6721__auto____68271.invoke(jvm.clj:9)
I found a very similar issue here resolve-var does not existhttps://github.com/cloojure/tupelo/issues/11
But we don't use tupelo.
lein clean
didn't help
Any ideas about what may be wrong?Here's the full stacktrace with several references to propriatery namespaces replaced with things like XXX
, etc.
Hi I’m getting the following error when running `lein run`. Not sure what’s causing it:
Syntax error compiling at (/tmp/form-init5805669980636889423.clj:1:73).
19
could not find a non empty configuration file to load. looked in the classpath (as a "resource") and on a file system via "conf" system property
21
This error occurs in continuous integration and not locallyhttp://grep.app hints it has to do with https://github.com/tolitius/cprop not lein itself I guess that a config file has to be present in the classpath? Make sure that's the case. lein profiles play a role, the dev profile is active by default in some but not all tasks
fixed
I’m running the following command in continuous integration:
lein run -m user < /dev/null && npm i
however, the problem is that the first command never terminates, and adding & after it causes the second command to run before the first command is finished. Is there a way to run the first command and wait for it to finish before running the second command?
that's what ;
does - lein run -m user < /dev/null; npm 1
- or you can just put each command on its own line if this is a script file
but I'm still confused "the first command never terminates" would be a problem no matter what
if you’re starting a web server like i’ve seen you say, i would not expect lein run
to terminate. It would launch a web server to keep handling requests
yeah but it runs a bunch of things and then settles down.
I want the other stuff to run (some tests) after it has populated the db in lein run and such
a straight forward way to do this is a little program that looks like
(db/migrate!)
(webserver/start! (config/CI))
(clojure.test/run-all-tests)
or something like that.if the timing is predictable you can use lein run; sleep 10; npm 1
or you could pipe lein's output to a file, then wait for the file to contain a line of output indicating the server started before doing the next step- something like
lein run > logfile < /dev/null
tail -f logfile | grep -m1 "webserver started"
npm 1
the m1
makes grep exit after 1 matchalso, in CI you might already be dealing with docker images, and docker-compose has utilities for ensuring one task is done / ready for input before the next runs
another consideration is that if you make migrate a separate task instead of bundling it into run, you can wait for it to successfully complete and the start time for run will be smaller and more predictable
even more so, if you bulld a jar first, then use java to run that jar for the migrate and run steps