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

fix runtime dependency resolution issue #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ object SbtVersionPolicySettings {
val sv = scalaVersion.value
val sbv = scalaBinaryVersion.value

val compileReport = update.value.configuration(Compile).getOrElse {
val compileReport = update.value.configuration(Runtime).getOrElse {
sys.error("Compile configuration not found in update report")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package sbtversionpolicy.internal

import coursier.version.{ModuleMatchers, VersionCompatibility}
import sbt.Compile
import sbt.librarymanagement.{ConfigurationReport, CrossVersion, ModuleID}
import sbt.librarymanagement.{ConfigurationReport, CrossVersion, DependencyResolution, ModuleID, ScalaModuleInfo, UnresolvedWarningConfiguration, UpdateConfiguration, syntax}
import sbt.util.Logger
import sbt.librarymanagement.{DependencyResolution, ScalaModuleInfo, UnresolvedWarningConfiguration, UpdateConfiguration}
import sbtversionpolicy.DependencyCheckReport

object DependencyCheck {
Expand Down Expand Up @@ -66,7 +65,7 @@ object DependencyCheck {

val previousReport = depRes.update(mod, updateConfig, warningConfig, log)
.fold(thing => throw thing.resolveException, identity)
val previousCompileReport = previousReport.configuration(Compile).getOrElse {
val previousCompileReport = previousReport.configuration(syntax.Runtime).getOrElse {
sys.error(s"Compile configuration not found in previous update report $previousReport")
}
val previousDependencies = DependencyCheck.modulesOf(previousCompileReport, excludedModules, sv, sbv, moduleToVersion, log)
Expand Down