-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local_repo not being used for resolving plugin dependencies #1140
Comments
Are you actually using |
Sorry, yes, ":local-repo" not ":local_repo" - see https://gist.github.com/kornysietsma/5368225 for the code
If you comment out the ":local-repo" line, then If you then restore the ":local-repo" line, (tested with Leiningen 2.1.2 on Java 1.6.0_37) |
Is anyone else able to reproduce this? |
@kornysietsma have you tested this with jdk7 (just not 6) because I think I've seen this(or similar) happen in ccw and was wondering if it's related (in ccw is solvable by making sure eclipse runs jdk7 and not 6) |
I'm having the same problem. I tried: And it didn't work either. |
I think this is fixed on master; feel free to reopen with repro steps if you're still seeing it. |
I am seeing this when :local-repo is specified in any profile (other than at the top level). All plugins are resolved against and downloaded to ~/.m2/repository Issue goes away if :local-repo is specified at the top level in project.clj, or if no plugins are specified at project level. Workaround: Move all plugins into the :dev profile inside the project.clj, then the profiles.clj :local-repo setting will be correctly picked up. Steps to reproduce:
Outcome: Plugins will be resolved against default m2 repo location while depdendencies of the project will correctly use the :local-repo Summary: Resolution of plugins declared at the top level only obey :local-repo directives also declared at the top level. |
I've just been bit by this, on Linux. I can't get this to work other then by deleting :local-repo from project.clj. Other plugins work fine, but not kibit. Could maybe possibly be related to #2111. However, I'm using a much different setup than the one I mention in that issue. This is what I have now: (defproject villarrica-backend "0.1.0-SNAPSHOT"
:description "The new new Content Manager backend."
:url "https://github.com/lynxtp/villarrica-backend"
:dependencies [[com.datomic/datomic-pro "0.9.5350" :exclusions [commons-codec]]
[compojure "1.5.0"]
[org.clojure/clojure "1.8.0"]
[org.clojure/data.json "0.2.6"]
[ring-middleware-format "0.7.0"]
[ring/ring-core "1.4.0"]
[ring/ring-defaults "0.2.0"]]
:repositories {"my.datomic.com" {:url "https://my.datomic.com/repo"
:password :env/datomic_repo_password
:username :env/datomic_repo_username}}
:local-repo "/srv/lein/repo"
:target-path "/var/cache/target/%s"
:clean-targets ^{:protect false} [:target-path ".coverage"]
:profiles {:ancient
{:plugins [[lein-ancient "0.6.10"]]}
:cloverage
{:plugins [[lein-cloverage "1.0.6"]]}
:cider
{:plugins [[cider/cider-nrepl "0.11.0"]]}
:dev
{:dependencies [[com.cognitect/transit-clj "0.8.285"]
[org.clojure/test.check "0.9.0"]
[ring/ring-mock "0.3.0"]]}
:eastwood
{:plugins [[jonase/eastwood "0.2.3"]]}
:environ
{:plugins [[lein-environ "1.0.2"]]}
:kibit
{:plugins [[lein-kibit "0.1.2"]]}
:prone
{:dependencies [[prone "1.1.1"]]
:ring {:stacktrace-middleware prone.middleware/wrap-exceptions}}
:ring
{:plugins [[lein-ring "0.9.7"]]
:ring {:handler villarrica.backend.ring/api}}
:squiggly
{:dependencies [[acyclic/squiggly-clojure "0.1.5" :exclusions [org.clojure/tools.cli]]
^:replace [org.clojure/tools.nrepl "0.2.12"]]
:env {:squiggly {:checkers [:eastwood :kibit]}}}
:ultra
{:plugins [[venantius/ultra "0.4.1"]]}
:uberjar
{:aot :all}}
:aliases {"coverage"
["with-profile" "+cloverage,+ultra" "do" "clean," "cloverage" "-o" ".coverage"]
"eastwood"
["with-profile" "+eastwood" "eastwood"]
"emacs"
["with-profile" "+cider,+eastwood,+environ,+kibit,+squiggly,+ultra" "repl"]
"kibit"
["with-profile" "+kibit" "kibit" "src" "test"]
"repl"
["with-profile" "+ultra" "repl"]
"serve"
["with-profile" "+ring" "ring" "server-headless" ~(System/getenv "VILLARRICA_BACKEND_PORT")]
"test"
["with-profile" "+ultra" "test"]
"update-dependencies"
["with-profile" "+ancient,+cloverage,+cider,+eastwood,+environ,+kibit,+prone,+ring,+squiggly,+ultra" "ancient" "upgrade" ":all" ":check-clojure"]}) What's funny is that kibit works in the emacs profile (via squiggly-clojure) but not in the kibit profile alone. |
I believe I have a very simple repro for this with leiningen 2.7.1: https://github.com/overthink/lein-local-repo-issue It looks like lein will happily download dependencies into the local repo (i.e. when resolving deps), but when the plugin (kibit) is actually run lein doesn't look in the local repo. My current "understanding" anyway. UPDATE: This turns out to be kibit-specific. I've submitted a PR to lein-kibit that fixes this in some cases: jonase/lein-kibit#10 |
(Note: this is on Windows, not sure if it's platform specific)
I've been trying to use lein-kibit on a project that has a :local_repo setting (as ~/.m2 is on a network drive so slow).
If I add [lein-kibit "0.0.8"] to :plugins and run "lein kibit", the "jonase/kibit" and "lein-kibit" jars are downloaded to my local repo, but then I get the error:
If I remove the :local_repo setting, the jars are downloaded to ~/.m2 and then "lein kibit" works.
If I restore the original :local_repo value, "lein kibit" continues to work - it seems the jar is being accessed from ~/.m2/repository despite my :local_repo setting. If I remove the ~/m2/repository directory, "lein kibit" breaks again.
The text was updated successfully, but these errors were encountered: