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
leiningen’s clojure version is independent of your project’s version
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
I don’t know of a caveat w/trampoline
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
ahh
you may referring to specific usages - that’s possible
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
Yeah, I think its doing more with it - for raw speed
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
not the only usage of it - at least how I see it
yeah, you should still get your own classpath for your project with the standard trampoline
meaning whatever clj version you support etc
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
and perhaps it’s just out of date
I’d recommend you do lein with-profile +1.8 test
though
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
(assuming this is used - haven’t dug too much)
but it does do the +1.8
style
actually,
lein with-profile +$(CLOJURE_VERSION),+test,+plugin.mranderson/config
for the test
task, the +test
should be superfluous, but still probably just run it the same as the scripts
or you can acutlaly use this Makefile
if you want to go about testing that way
Of course at this point, looks like a #cider question
yes already asked there as well, was just wondering if is more some wrong assumptions about leiningen
sure