Details

    • Type: Task
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Server
    • QA Risk Assessment:
      Needs Assessment

      Description

      Dependency resolution in leiningen seems wacky.

      When trying to resolve org.clojure/tools.nrepl lein would pull in 0.2.12 which is the version that lein depends on. When upgrading to clj-parent 2.0.0 I would get a pendatic abort saying that puppetserver had a top level dependency on nrepl (didn't) and that all of its other dependencies should exclude nrepl (clj-parent 2.0.0 defines nrepl as 0.2.13 and so all dependencies that it pulls in have nrepl set to 0.2.13). Having lein output a pom file and having maven resolve that showed no conflicts.

      I should note that we have a dev dependency on leiningen (see SERVER-2215 to get rid of it) but this work included placing an exclusion on nrepl for our leiningen dependency.

      Putting nrepl as an explicit dependency seems to have fixed this.

      From that, I think what is happening is: a project's dependencies are being resolved with lein's with a projects explicit dependencies taking precedence, but lein's explicit dependencies taking precedence over managed-dependencies (like what is provided by clj-parent).

      This may or may not have to do with the warnings output to stderr whenever we now run lein that

      Tried to load commons-codec version 1.4 but 1.9 was already loaded.
      

      etc...

      It also may or may not have anything to do with the fact that the tried-to-load version and already-loaded version do not necessarily match the output of lein deps :tree....

       

      If digging into the leiningen source code it should be noted that tests should be ran with bin/lein that is built from running lein bootstrap. This isn't mentioned in the docs (and if you wanted to open a PR for that that'd be great too).

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  justin Justin Stoller
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: