updateClassifiers fails to resolve javadocs and sources when ivy config extends a private config

83 views
Skip to first unread message

Jerry Lin

unread,
May 1, 2017, 4:40:07 PM5/1/17
to sbt-dev
Hey everyone,

I've recently noticed upgrading from SBT 0.13.9 to 0.13.11+ causes source jars to be unresolved for a number of our dependencies. After digging into it, it appears to do this on dependencies where we depend on a configuration that extends a private configuration in the ivy definition.

An example of such a configuration is shown in the Ivy configuration example here:

I've noticed that SBT will refuse to publish any ivy files which have a public configuration extending a private configuration, however, it seems that non-SBT based builds will do so and there is nothing I could find in the Ivy specification against it. It seems SBT could be more robust and still resolve the appropriate javadoc/sources in the case where the extended configuration is private.

Using an existing SBT test, I was able to reproduce the issue. What appears to happen is it gives up resolving the docs with message "org.example#bippy_2.11;1.0-SNAPSHOT: configuration not public in org.example#bippy_2.11;1.0-SNAPSHOT: 'compileData'. It was required from org.example#myapp$sources_javadoc_2.11;1.0-SNAPSHOT test-internal"


After cloning, from the SBT root directory, you can reproduce with the following steps:

$ cd sbt/src/sbt-test/ivy-deps-management/update-classifiers-snapshot-srcs
$ sbt bippy/publishLocal
$ cp changes/ivy-1.0-SNAPSHOT.xml target/ivy/local/org.example/bippy_2.11/1.0-SNAPSHOT/ivys/ivy.xml
$ sbt

> myapp/updateClassifiers
> check 1

Sample output:

> myapp/updateClassifiers
[info] Updating {file:/Users/jrlin/Projects/sbt/sbt/src/sbt-test/ivy-deps-management/update-classifiers-snapshot-srcs/}myapp...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Resolving jline#jline;2.12.1 ...
[info]     [SUCCESSFUL ] org.scala-lang#scala-library;2.11.7!scala-library.jar(doc) (757ms)
[info]     [SUCCESSFUL ] org.scala-lang#scala-library;2.11.7!scala-library.jar(src) (46ms)
[info]     [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.7!scala-compiler.jar(doc) (366ms)
[info]     [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.7!scala-compiler.jar(src) (85ms)
[info]     [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4!scala-parser-combinators_2.11.jar(doc) (39ms)
[info]     [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4!scala-parser-combinators_2.11.jar(src) (19ms)
[info]     [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.4!scala-xml_2.11.jar(src) (22ms)
[info]     [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.4!scala-xml_2.11.jar(doc) (56ms)
[info]     [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.7!scala-reflect.jar(src) (36ms)
[info]     [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.7!scala-reflect.jar(doc) (153ms)
[info]     [SUCCESSFUL ] jline#jline;2.12.1!jline.jar(src) (20ms)
[info]     [SUCCESSFUL ] jline#jline;2.12.1!jline.jar(doc) (30ms)
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: org.example#bippy_2.11;1.0-SNAPSHOT: configuration not public in org.example#bippy_2.11;1.0-SNAPSHOT: 'compileData'. It was required from org.example#myapp$sources_javadoc_2.11;1.0-SNAPSHOT test-internal
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[success] Total time: 3 s, completed Apr 28, 2017 3:33:05 PM
> check 1
[trace] Stack trace suppressed: run last update-classifiers-snapshot-srcs/*:check for the full output.
[error] (update-classifiers-snapshot-srcs/*:check) bippy_2.11-1.0-SNAPSHOT-sources.jar MIA
[error] Total time: 0 s, completed Apr 28, 2017 3:33:12 PM

Jerry Lin

unread,
May 4, 2017, 12:24:39 PM5/4/17
to sbt-dev
Bump.

This regression is impactful enough for a significant number of our teams to not use a version of SBT past 0.13.9. Should I file this as a Github issue?

eugene yokota

unread,
May 4, 2017, 12:47:58 PM5/4/17
to sbt...@googlegroups.com
Yes. Let's move this to GitHub issue.

-eugene


--
You received this message because you are subscribed to the Google Groups "sbt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbt-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sbt-dev/ece1d1ce-f6c1-4f28-b2af-e8a5359ecd04%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages