Skip to content
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

Can't build cider-nrepl with lein 2.8.0: source-deps task is broken #449

Closed
pdbrown opened this issue Oct 30, 2017 · 10 comments · Fixed by benedekfazekas/mranderson#15
Closed

Comments

@pdbrown
Copy link
Contributor

pdbrown commented Oct 30, 2017

Expected behavior

When building cider-nrepl from source using leiningen 2.8.0, one should be able to build inline deps with the manderson plugin, as per https://github.com/clojure-emacs/cider-nrepl#working-with-mranderson-inlining-dependencies. Works with lein 2.7.1:

$  lein source-deps :project-prefix cider.inlined-deps
project prefix:  cider.inlined-deps
retrieve dependencies and munge clojure source files
  retrieving tools.trace artifact.
...

Actual behavior

With lein 2.8.0, building source deps fails:

$  lein source-deps :project-prefix cider.inlined-deps
java.lang.ClassCastException: Cannot cast org.apache.maven.repository.internal.DefaultVersionResolver to org.sonatype.aether.impl.VersionResolver
        at java.lang.Class.cast(Class.java:3369)
        at org.sonatype.aether.impl.internal.DefaultServiceLocator.getServices(DefaultServiceLocator.java:161)
        at org.sonatype.aether.impl.internal.DefaultServiceLocator.getService(DefaultServiceLocator.java:133)
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.initService(DefaultRepositorySystem.java:142)
        at org.sonatype.aether.impl.internal.DefaultServiceLocator.getServices(DefaultServiceLocator.java:181)
        at org.sonatype.aether.impl.internal.DefaultServiceLocator.getService(DefaultServiceLocator.java:133)
        at mranderson047.pomegranate.v0v3v0.cemerick.pomegranate.aether$repository_system.invokeStatic(aether.clj:110)
        at mranderson047.pomegranate.v0v3v0.cemerick.pomegranate.aether$repository_system.invoke(aether.clj:108)
        at mranderson047.pomegranate.v0v3v0.cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic(aether.clj:691)
...

which causes additional exceptions, see stacktrace.txt

This seems like a classpath issue, as leiningen changed it's dependencies from 2.7.1 -> 2.8.0. I couldn't fix the problem with a first-order attempt at fiddling with exclusions and forced versions, but someone who knows how manderson/pomegranate/aether/maven/leiningen interact might. Once this is figured out, it would be nice to add a :pedantic? :abort entry to the build as well.

Environment & Version information

cider-nrepl version

0.16.0-SNAPSHOT @ ce42411

Java version

openjdk 1.8.0_131

Operating system

Debian 4.9.30-2+deb9u2

@bbatsov
Copy link
Member

bbatsov commented Oct 30, 2017

@benedekfazekas Any ideas?

@bbatsov
Copy link
Member

bbatsov commented Oct 30, 2017

Looking at the stacktrace it seems to me the problem is with pomegranate. I guess the updated deps broke something there.

@benedekfazekas
Copy link
Member

yup @bbatsov it seems that the deps upgrades with leiningen broke it. will try to have a look this week.

@SevereOverfl0w
Copy link
Contributor

This can be fixed by simply updating pomegranate in mr anderson (and cider-nrepl's dependency on mr anderson)

@bbatsov
Copy link
Member

bbatsov commented Nov 19, 2017

I assumed as much. I hope @benedekfazekas will cut a new release soon.

@benedekfazekas
Copy link
Member

benedekfazekas commented Nov 19, 2017 via email

benedekfazekas added a commit that referenced this issue Nov 23, 2017
to fix leiningen 2.8.x incompatibility issues
benedekfazekas added a commit that referenced this issue Nov 23, 2017
to fix leiningen 2.8.x incompatibility issues
Also bump lein version on travis
@benedekfazekas
Copy link
Member

well, the mranderson version upgrade still needs to be merged here, so a bit early to close this

@bbatsov
Copy link
Member

bbatsov commented Nov 24, 2017

@SevereOverfl0w Can you take a look at the open PR? We're facing some mysterious problems and unfortunately I don't have time to investigate them.

@SevereOverfl0w
Copy link
Contributor

I'll take a look now.

@SevereOverfl0w
Copy link
Contributor

This seems related to https://dev.clojure.org/jira/browse/NREPL-87 & travis-ci/travis-ci#3302

I'm still figuring a concrete fix out, but reporting here in case I don't get time to finish it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants