This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-02
Channels
- # aleph (1)
- # architecture (4)
- # beginners (39)
- # boot (12)
- # cider (25)
- # cljs-dev (3)
- # cljsrn (5)
- # clojure (175)
- # clojure-dusseldorf (1)
- # clojure-italy (13)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (52)
- # clojure-uk (110)
- # clojurescript (35)
- # data-science (2)
- # datomic (61)
- # editors (8)
- # emacs (2)
- # fulcro (7)
- # graphql (15)
- # hoplon (1)
- # hyperfiddle (3)
- # jobs (4)
- # jobs-discuss (12)
- # juxt (2)
- # lein-figwheel (6)
- # leiningen (35)
- # off-topic (4)
- # onyx (5)
- # parinfer (1)
- # pedestal (63)
- # re-frame (38)
- # reitit (7)
- # ring-swagger (7)
- # rum (2)
- # shadow-cljs (27)
- # tools-deps (10)
- # uncomplicate (16)
but if a plugin has middleware that adds to your dependencies collection, does it make a difference then?
Hey…
Just seen your questions about :middleware
adding dependencies etc… FWIW I went through this recently when writing the lein-tools-deps
plugin:
https://github.com/RickMoynihan/lein-tools-deps
Plugins can add :dependencies
themselves, we do it with lein-tools-deps
, though tools.deps
typically fetches them and installs them into .m2
so leiningen won’t usually fetch them again (though I believe it would if it didn’t find).
For reference - most leiningen tasks are implemented as plugins, and some add :dependencies
too. e.g. lein repl
:
https://github.com/technomancy/leiningen/blob/master/src/leiningen/repl.clj#L199-L203
Note they define a profile internally which allows a user the ability to override the plugins deps if they need to specify a different version etc to resolve a conflict.
Hope this helps.
oh I forgot about the internal profile trick -- I wonder if that's the way to keep the deps out of prod
e.g., if the profile only gets added for specific tasks
I'm not sure that's doable if it's an existing task though, like repl
or run
yeah if it’s an existing task you might need to do something else… though you may with middleware be able to override their internal profile from your plugin… don’t know though.
I guess so?
I’m not sure how good an idea it is for a plug-in to add dependencies when they haven’t been asked for, for this kind of reason
If I run the lein-localrepo
plugin via lein with-profile
I get an error about a suppressed exit, flipping on the DEBUG
envvar I found out it’s because lein-localrepo
calls (main/exit 0)
itself.
This seem like an issue with lein-localrepo
, for completeness: https://github.com/kumarshantanu/lein-localrepo/issues/13
$ lein help install
Install jar and pom to the local repository; typically ~/.m2.
Does anyone know if there is more documentation on this somewhere? Specifically, what might cause “the local repository” to not be ~/.m2? It’s installing the jar to the project directory instead and I can’t figure out why.@enn this https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L140
there is a project prop called :local-repo
, sounds like you may have it set to a non-default?
Do you have a ~/profiles.clj
doing this perhaps, if not your project.clj
of your current project
@mikerod I don’t have that set in either of the places I know to look:
$ grep local-repo project.clj
$ grep local-repo ~/.lein/profiles.clj
$
@enn well, it is normal to install the project artifacts to /target
of the current project (or whatever you have your output/target dir configured to)
But it should also be putting the artifacts in ~/.m2
. Are you sure that is not what is happening?
It doesn’t appear to be installing in ~/.m2
anymore although it was last week. Now when I run lein install
the old remains in ~/.m2
.
I deleted the older install under ~/.m2
and ran lein install
again and it was not replaced.
regardless of auto replace shouldn’t it have installed it under ~/.m2
after I deleted it?
@enn can you share your whole project.clj?