This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-03
Channels
- # aleph (1)
- # announcements (3)
- # aws (36)
- # babashka (35)
- # beginners (25)
- # cider (14)
- # clj-kondo (3)
- # clojure (154)
- # clojure-europe (8)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-serbia (1)
- # clojure-uk (133)
- # clojurescript (36)
- # cursive (15)
- # data-science (7)
- # datomic (16)
- # fulcro (34)
- # immutant (9)
- # jackdaw (5)
- # jobs (1)
- # leiningen (39)
- # off-topic (25)
- # pathom (42)
- # planck (13)
- # play-clj (1)
- # re-frame (18)
- # reagent (6)
- # reitit (3)
- # remote-jobs (1)
- # ring-swagger (16)
- # shadow-cljs (67)
- # sql (22)
- # testing (1)
- # uncomplicate (2)
- # vim (21)
- # vscode (6)
Hey, running into some issues when testing something with clojure 1.8. I get
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: *print-namespace-maps* in this context, compiling:(leiningen/core/main.clj:342:5)
using lein 2.9.1
the variable was introduced in clojure 1.9 is this expected behavior?
https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/main.clj#L342@finn.volkel I don’t think I understand enough context. It’d be easier if you could show a project.clj setup like you are describing with your error.
@mikerod https://github.com/clojure-emacs/cider-nrepl/blob/master/project.clj
lein with-profile 1.8,dev test
what's the motivation for using clojure 1.8 instead of a newer one? afaik your options are downgrading lein ot an older version, or upgrading clojure
@finn.volkel I’m still confused. Why are you showing me the cider-nrepl
project ?
or perhaps this is what you want to test - in that case though, the issue sounds like it just is that cider-nrepl
no longer is 1.8 compatible - since it uses something new from 1.9 perhaps - I’m not sure if these profiles are all regularly tested for that project
that goes for all dependencies - unless you are writing a plugin - then you are on leiningen’s own classpath
(this is one major reason why leiningen defaults to launching 2 jvm’s - 1 for it’s own setup and libs, and one for your independent project runtime)
there's a gotcha for trampoline though right?
which actually comes down to the eval-in-project
and friends fns in leiningen.core.eval
lein
launches it’s own jvm first - emits some info for the next process to run w/ so it can shutdown
and later launches, I think it tries to avoid relaunching it’s first jvm if “nothing has changed with project setup”
oh, I thought fast-trampoline would reuse the vm
I believe https://github.com/technomancy/leiningen/wiki/Faster goes through some of this - I’d have to re-read
yeah, following that guide and using fast trampoline is the only time I've used trampoline, so I kind of conflated the two
and that doesn't have the mentioned issue since it caches the state the lein jvm creates, it doesn't try to share a vm
yeah, you should still get your own classpath for your project with the standard trampoline
I just got the error when running the tests. I guess it has to do with cider-nrepl containing some leiningen plugin.
on the surface (not looking at it), seems like it doesn’t correctly function with clj 1.8
to avoid assuming which profiles you need - just take the defaults in addition to 1.8
but really, that comes down to how project is configured and things are expected to be ran
this looks to be the way it is automatically built https://github.com/clojure-emacs/cider-nrepl/blob/master/Makefile#L15
for the test
task, the +test
should be superfluous, but still probably just run it the same as the scripts