librelist archives

« back to archive

Leiningen built-in dependencies

Leiningen built-in dependencies

From:
Alex Hall
Date:
2013-07-31 @ 15:48
I wanted to follow up on issue 1267 (
https://github.com/technomancy/leiningen/issues/1267) that I reported a
couple of days ago, regarding REPL-related dependencies from the built-in
:base profile showing up in the pom.xml dependencies.

Phil's reply said, in part: "The :base profile can be considered the
equivalent of the :dev profile, but for settings which are built-in to
Leiningen itself. If we called it :dev, then project.clj files which
included a :dev profile would shadow it." That's fine, and I'm satisfied
with that response, but I do have a couple more questions:

1. The fact that there are additional dependencies specified in :base that
need to be added to the project classpath in order for certain built-in
Leiningen features to work implies that these features will no longer work
if a :base profile in included in project.clj or ~/.lein/profiles.clj. As
far as I can tell there's nothing to protect from that happening - maybe
there should be a warning if a user or project attempts to redefine :base?

2. The pom task isn't the only place where dependencies specified by :base
are user-visible. In particular, these show up in the output from `lein
deps :tree`. I'm of two minds on this - on the one hand, it is a dependency
and does get added to a classpath and that's potentially relevant
information if I'm debugging classpath issues. On the other hand, it's very
disconcerting as a user to see dependencies show up in my project that I
didn't specify anywhere in my project.clj or in my user profile. In that
case, I think it might helpful, and a useful feature in general, for the
output from the dependency tree to indicate which profile added each
dependency. Maybe that's a feature request that could be considered for a
future Leiningen version?

Thanks,
Alex