Skip to content

Fix for sbt/sbt#2435#2513

Merged
eed3si9n merged 4 commits intosbt:0.13from
Duhemm:wip/fix-2435
Apr 22, 2016
Merged

Fix for sbt/sbt#2435#2513
eed3si9n merged 4 commits intosbt:0.13from
Duhemm:wip/fix-2435

Conversation

@Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Mar 14, 2016

Fixes #2435

Consider a configuration where we have two projects, A and B.

A has a library dependency on "a" % "b" % "1.0.0" % "compile->runtime"
and "a" % "b" % "1.0.0" % "compile->runtime2"

B depends on project A, and has a library dependency on
"a" % "b" % "1.0.1" % "compile->runtime".

Note that project B depends on a more recent version of "a" % "b" than
project A, and that it depends ONLY on it's "runtime" configuration.

However, when compiling project B, we expect to have on the classpath
project A, and "a" % "b" % "1.0.1" % "compile->runtime" AND
"a" % "b" % "1.0.1" % "compile->runtime2" because it is part of the
compile configuration of project A.

This commit changes the cached resolution engine so that it behaves like
that, by first resolving dependencies on other project and then ensuring
that the dependent project specifies dependencies on the same
configurations.

Duhemm added 2 commits March 14, 2016 15:58
Consider a configuration where we have two projects, A and B.

A has a library dependency on "a" % "b" % "1.0.0" % "compile->runtime"
and "a" % "b" % "1.0.0" % "compile->runtime2"

B depends on project A, and has a library dependency on
"a" % "b" % "1.0.1" % "compile->runtime".

Note that project B depends on a more recent version of "a" % "b" than
project A, and that it depends ONLY on it's "runtime" configuration.

However, when compiling project B, we expect to have on the classpath
project A, and "a" % "b" % "1.0.1" % "compile->runtime" AND
"a" % "b" % "1.0.1" % "compile->runtime2" because it is part of the
compile configuration of project A.

This commit changes the cached resolution engine so that it behaves like
that, by first resolving dependencies on other project and then ensuring
that the dependent project specifies dependencies on the same
configurations.

Mark test dependency-management/cached-resolution-configurations as
passing.
@Duhemm
Copy link
Contributor Author

Duhemm commented Apr 13, 2016

I still can't reproduce the failure on my machine. The failure on Travis is different from the original failure (before my fix).

Wiping the cache on Travis seems to fix the issue.

@Duhemm Duhemm changed the title (WIP) Attempt at fixing sbt/sbt#2435 Fix for sbt/sbt#2435 Apr 13, 2016
@eed3si9n
Copy link
Member

notes and forward port plz

@eed3si9n
Copy link
Member

LGTM

@eed3si9n eed3si9n merged commit 40644ae into sbt:0.13 Apr 22, 2016
@eed3si9n
Copy link
Member

I'm seeing Travis CI failures on dependency-management/cached-resolution-configurations from PRs that has nothing to do with library management.

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.

2 participants