Skip to content

Setting to always select generic compiler interface sources#2174

Closed
Duhemm wants to merge 1 commit intosbt:0.13from
Duhemm:cascading-versions-disable
Closed

Setting to always select generic compiler interface sources#2174
Duhemm wants to merge 1 commit intosbt:0.13from
Duhemm:cascading-versions-disable

Conversation

@Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Aug 24, 2015

As requested on Gitter by @jaceklaskowski, this PR adds a new setting that enables/disables the cascading versions mechanism for the lookup of compiler-interface sources.

By setting compilerInterfaceCascadingVersions := false, sbt will only try to fetch compiler-interface when it needs it.
With compilerInterfaceCascadingVersions := true, sbt will try to fetch compiler-interface_2.11.8, compiler-interface_2.11 and finally compiler-interface. This is the default behavior.

@eed3si9n eed3si9n added the ready label Aug 24, 2015
@typesafe-tools
Copy link

Can one of the admins verify this patch?

@eed3si9n
Copy link
Member

@jaceklaskowski wrote:

➜  docker-builds-sbt git:(master) ✗ docker run -v $(pwd):/scala-project -ti --rm docker-builds-sbt:latest
[info] Set current project to scala-project (in build file:/scala-project/)
> compile
[info] Updating {file:/scala-project/}scala-project...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Compiling 1 Scala source to /scala-project/target/scala-2.10/classes...
[info] Attempting to fetch org.scala-sbt % compiler-interface_2.10.5 % 0.13.10-SNAPSHOT. This operation may fail.
[info] Resolving org.scala-sbt#compiler-interface_2.10.5;0.13.10-SNAPSHOT ...
[warn]     module not found: org.scala-sbt#compiler-interface_2.10.5;0.13.10-SNAPSHOT
[warn] ==== local: tried
[warn]   /root/.ivy2/local/org.scala-sbt/compiler-interface_2.10.5/0.13.10-SNAPSHOT/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn]   https://jcenter.bintray.com/org/scala-sbt/compiler-interface_2.10.5/0.13.10-SNAPSHOT/compiler-interface_2.10.5-0.13.10-SNAPSHOT.pom
[warn] ==== sonatype-snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/org/scala-sbt/compiler-interface_2.10.5/0.13.10-SNAPSHOT/compiler-interface_2.10.5-0.13.10-SNAPSHOT.pom
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface_2.10.5/0.13.10-SNAPSHOT/compiler-interface_2.10.5-0.13.10-SNAPSHOT.pom
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: org.scala-sbt#compiler-interface_2.10.5;0.13.10-SNAPSHOT: not found
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[info] Attempting to fetch org.scala-sbt % compiler-interface_2.10 % 0.13.10-SNAPSHOT. This operation may fail.
[info] Resolving org.scala-sbt#compiler-interface_2.10;0.13.10-SNAPSHOT ...
[warn]     module not found: org.scala-sbt#compiler-interface_2.10;0.13.10-SNAPSHOT
[warn] ==== local: tried
[warn]   /root/.ivy2/local/org.scala-sbt/compiler-interface_2.10/0.13.10-SNAPSHOT/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn]   https://jcenter.bintray.com/org/scala-sbt/compiler-interface_2.10/0.13.10-SNAPSHOT/compiler-interface_2.10-0.13.10-SNAPSHOT.pom
[warn] ==== sonatype-snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/org/scala-sbt/compiler-interface_2.10/0.13.10-SNAPSHOT/compiler-interface_2.10-0.13.10-SNAPSHOT.pom
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface_2.10/0.13.10-SNAPSHOT/compiler-interface_2.10-0.13.10-SNAPSHOT.pom
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: org.scala-sbt#compiler-interface_2.10;0.13.10-SNAPSHOT: not found
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[info] Attempting to fetch org.scala-sbt % compiler-interface % 0.13.10-SNAPSHOT. This operation may fail.
[info] Resolving org.scala-sbt#interface;0.13.10-SNAPSHOT ...
[info] 'compiler-interface' not yet compiled for Scala 2.10.5. Compiling...
[info]   Compilation completed in 22.129 s
[success] Total time: 34 s, completed Aug 24, 2015 9:48:42 AM

it works
but is veeeery annoying

The cascade downloading is the future. If that isn't working smoothly, I don't think the answer is to disable it. We need to make it so it's not annoying. For example, we should think about:

  • silencing the Ivy output when we are downloading compiler interface JARs
  • caching the fact that the version-specific interface doesn't exist for this version of sbt in ~/.sbt/0.13/boot/

@dwijnand
Copy link
Member

I agree with @eed3si9n, a non-chatty default behaviour is preferable to yet another setting/boolean flying around.

@Duhemm
Copy link
Contributor Author

Duhemm commented Aug 26, 2015

Superseded by #2177

@Duhemm Duhemm closed this Aug 26, 2015
@eed3si9n eed3si9n removed the ready label Aug 26, 2015
@Duhemm Duhemm deleted the cascading-versions-disable branch January 27, 2016 08:11
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 this pull request may close these issues.

4 participants