-
Notifications
You must be signed in to change notification settings - Fork 12
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
CORE-69: update Scala, sbt versions and associated plugins #1566
Changes from all commits
e2eb2c6
a0cf79f
db93b61
732a9e5
a0c6025
229310e
300d37d
489c628
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.10.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.10.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ object Merging { | |
case PathList("META-INF", "kotlin-stdlib-common.kotlin_module") => MergeStrategy.first | ||
case PathList("META-INF", "okio.kotlin_module") => MergeStrategy.first | ||
case PathList("META-INF", "versions", "9", "OSGI-INF", "MANIFEST.MF") => MergeStrategy.first | ||
case PathList("META-INF", "license", "LICENSE.mvn-wrapper.txt") => MergeStrategy.first | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some dependencies changed, such that we now have an assembly merge conflict on |
||
case PathList("mozilla", "public-suffix-list.txt") => MergeStrategy.first | ||
case "module-info.class" => | ||
MergeStrategy.discard | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ object Settings { | |
"-language:existentials", // Existential types (besides wildcard types) can be written and inferred | ||
"-unchecked", // Enable additional warnings where generated code depends on assumptions. | ||
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access. | ||
"-Wconf:cat=deprecation:ws,any:e", // Fail the compilation if there are any warnings, except for deprecation warnings. | ||
"-Wconf:any:e,cat=deprecation:ws", // Fail the compilation if there are any warnings, except for deprecation warnings. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the "Breaking Changes" section of https://github.com/scala/scala/releases/tag/v2.13.15: the order in which Of note: I am not sure this setting is actually what we want. A few lines above we specify:
but here we configure deprecations to be |
||
"-Xlint:adapted-args", // Warn if an argument list is modified to match the receiver. | ||
"-Xlint:constant", // Evaluation of a constant arithmetic expression results in an error. | ||
"-Xlint:delayedinit-select", // Selecting member of DelayedInit. | ||
|
@@ -68,7 +68,7 @@ object Settings { | |
lazy val commonSettings = | ||
commonBuildSettings ++ commonAssemblySettings ++ commonTestSettings ++ List( | ||
organization := "org.broadinstitute.dsde.workbench", | ||
scalaVersion := "2.13.10", | ||
scalaVersion := "2.13.15", | ||
resolvers := proxyResolvers ++: resolvers.value ++: commonResolvers, | ||
scalacOptions ++= commonCompilerSettings, | ||
Compile / compile := (Compile / compile).dependsOn(Compile / scalafmtAll).value, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.10.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.0") | ||
|
||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") | ||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") | ||
|
||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.1") | ||
|
||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
|
||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0") | ||
|
||
addDependencyTreePlugin |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ trait SamRequestContextDirectives { | |
def withSamRequestContext: Directive1[SamRequestContext] = | ||
for { | ||
clientIP <- extractClientIP | ||
otelContext <- traceRequest | ||
otelContext <- traceRequest() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as of Scala 2.13.11, this caused compile to break. It's a warning, but we have |
||
} yield SamRequestContext(Option(otelContext), clientIP.toOption) | ||
|
||
/** Adds the route and parameters to telemetry. The route is consistent across all requests to the same endpoint. For example, if the route is | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,10 +51,10 @@ object SamAuditModelJsonSupport { | |
} | ||
} | ||
|
||
implicit val AuditInfoFormat = jsonFormat2(AuditInfo) | ||
implicit val AuditInfoFormat: RootJsonFormat[AuditInfo] = jsonFormat2(AuditInfo) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as of Scala 2.13.11, this caused compile to break. It's a warning, but we have The error was "Implicit definition should have explicit type" and we had many instances of this issue; lots of lines of code changed below. |
||
|
||
implicit val ResourceChangeFormat = jsonFormat1(ResourceChange) | ||
implicit val ResourceEventTypeFormat = new RootJsonFormat[ResourceEventType] { | ||
implicit val ResourceChangeFormat: RootJsonFormat[ResourceChange] = jsonFormat1(ResourceChange) | ||
implicit val ResourceEventTypeFormat: RootJsonFormat[ResourceEventType] = new RootJsonFormat[ResourceEventType] { | ||
def read(obj: JsValue): ResourceEventType = obj match { | ||
case JsString("ResourceCreated") => ResourceCreated | ||
case JsString("ResourceParentUpdated") => ResourceParentUpdated | ||
|
@@ -66,9 +66,9 @@ object SamAuditModelJsonSupport { | |
def write(obj: ResourceEventType): JsValue = JsString(obj.toString) | ||
} | ||
|
||
implicit val ResourceEventFormat = jsonFormat3(ResourceEvent) | ||
implicit val ResourceEventFormat: RootJsonFormat[ResourceEvent] = jsonFormat3(ResourceEvent) | ||
|
||
implicit val WorkbenchSubjectFormat = new RootJsonFormat[WorkbenchSubject] { | ||
implicit val WorkbenchSubjectFormat: RootJsonFormat[WorkbenchSubject] = new RootJsonFormat[WorkbenchSubject] { | ||
val MEMBER_TYPE_FIELD = "memberType" | ||
val USER_TYPE = "user" | ||
val GROUP_TYPE = "group" | ||
|
@@ -105,8 +105,8 @@ object SamAuditModelJsonSupport { | |
} | ||
} | ||
|
||
implicit val AccessChangeFormat = jsonFormat5(AccessChange) | ||
implicit val AccessChangeEventTypeFormat = new RootJsonFormat[AccessChangeEventType] { | ||
implicit val AccessChangeFormat: RootJsonFormat[AccessChange] = jsonFormat5(AccessChange) | ||
implicit val AccessChangeEventTypeFormat: RootJsonFormat[AccessChangeEventType] = new RootJsonFormat[AccessChangeEventType] { | ||
def read(obj: JsValue): AccessChangeEventType = obj match { | ||
case JsString("AccessAdded") => AccessAdded | ||
case JsString("AccessRemoved") => AccessRemoved | ||
|
@@ -116,5 +116,5 @@ object SamAuditModelJsonSupport { | |
def write(obj: AccessChangeEventType): JsValue = JsString(obj.toString) | ||
} | ||
|
||
implicit val PolicyEventFormat = jsonFormat3(AccessChangeEvent) | ||
implicit val PolicyEventFormat: RootJsonFormat[AccessChangeEvent] = jsonFormat3(AccessChangeEvent) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here and elsewhere, set the
scala-sbt
docker image to the version that uses sbt 1.10.2 and Scala 2.13.15.The docker image upgrade must have updated its version of git, because it started running into the "dubious ownership" error; so, I also added the incantation to set the git
safe.directory
.