Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWarn if lein < 2.9.0 #2630
Warn if lein < 2.9.0 #2630
Comments
You're making a good point, but running |
Don't know how much of a hack you'd think this would be but I checked every version since 2.5.3 (the version I'm stuck on) and they all have a well-formed
|
Not an expert on how lein works, but is this env variable available in the repl process and thus somehow visible to cider? Other thought: Does the output of the |
No it's not available outside the script. Cider would need to parse it out of the script by hand. At least AFAICT. |
Given that |
I brought this up because ideally we'd check for this before we actually start a server and get some weird results. After the server is running checking for the lein version is easy, but I don't think that's what we want to do in this scenario. |
Well, i thought it would be handled like the warning about the outdated nrepl version. So still offer the (potentially limited) repl functionality, but improve the specificity of the warning to give a clearer hint how to fix the problem. If it should be checked beforehand efficiently, then i see no other way as to parse the shell script. But that gives me an uneasy feeling because of brittleness, and Windows needs to be considered, too… |
Accidently, i tried using cider with lein 2.8.1 (default version when installed through apt on Linux Mint). Because of the group-id/artifact-id change of nrepl, the dependency injection on the
lein
command line for nrepl 0.6.0 does not work when doingcider-jack-in
, because loadingorg.clojure/tools.nrepl
seems to have precedence overnrepl/nrepl
. Even adding thenrepl/nrepl
dependency in~/.lein/profiles.clj
as described in the troubleshooting section does not help. The repl buffer is rightfully complaining that i should at least use nrepl 0.4.4, but the root cause (failed dependency injection because of outdated lein version) stays hidden, because the commandline displayed in the minibuffer when doingcider-jack-in
clearly states the nrepl/nrepl 0.6.0 dependency.After finding the root cause (and noticing the minimum lein version requirement in the cider documentation) and updating to lein 2.9.1 everything worked smooth.
It would be very helpful when the repl buffer would warn me about my outdated
lein
version instead of or additionally to the warning about the outdated nrepl version. I guess this could be done by callinglein version
and parsing the output when the nrepl version is detected to be too old. Unfortunately i cannot provide a PR because i am lacking elisp knowledge.