alexarchambault / sbt-ammonite

SBT plugin to ease the launch of Ammonite
49 stars 8 forks source link

Conflicts with ensime-sbt #9

Open laughedelic opened 8 years ago

laughedelic commented 8 years ago

This is what I get when I try ammonite:run:

> ammonite:run
java.lang.IllegalArgumentException: Cannot add dependency 'org.scala-lang#scala-compiler;2.11.7' to configuration 'ensime-internal' of module foo#bar_2.11;0.1.0-SNAPSHOT because this configuration doesn't exist!
    at org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor.addDependencyConfiguration(DefaultDependencyDescriptor.java:565)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:157)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:128)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:118)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:113)
[trace] Stack trace suppressed: run last ammonite:update for the full output.
[error] (ammonite:update) java.lang.IllegalArgumentException: Cannot add dependency 'org.scala-lang#scala-compiler;2.11.7' to configuration 'ensime-internal' of module foo#bar_2.11;0.1.0-SNAPSHOT because this configuration doesn't exist!

I think that the added scala-compiler dependency in this plugin conflicts with the one added in ensime-sbt (here I guess)

alexarchambault commented 8 years ago

Argh, I was using ensime-sbt 0.2.3, which seems fine. But I confirm that there's a conflict with ensime-sbt 0.3.2...

laughedelic commented 8 years ago

@alexarchambault do you know how to fix it?

Looking at this comment, are you sure it's needed at all?

panagiotious commented 8 years ago

Has this been fixed? I am having the same issue with ensime-sbt 0.4.0!

alexarchambault commented 8 years ago

@panagiotious It's not fixed yet.

The problem seems to originates from the Ivy configuration of ensime (ensime-internal) being absent in ammonite:ivyConfigurations. Not a problem in itself, but there still dependencies under that configuration in the libraryDependencies used by sbt-ammonite. And the default SBT update doesn't expect this kind of things. A solution may consist in filtering out these dependencies from libraryDependencies under the ammonite scope (keeping only those whose configuration exists in ammonite:ivyConfigurations)...

barambani commented 7 years ago

I'm having the same issue with sbt-ensime 0.5.1. Any plans for a solution or a work around ? Thanks

chipsenkbeil commented 7 years ago

FYI, I hit this problem with sbt-scala-debugger, which was based off of your work on sbt-ammonite, for version 1.9.1 of sbt-ensime, but when I updated to 1.12.4, the error went away. Don't know if that version fixes sbt-ammonite as well.