Skip to content

Commit

Permalink
Merge pull request #977 from eed3si9n/wip/use1.5.1
Browse files Browse the repository at this point in the history
Use sbt 1.5.1
  • Loading branch information
eed3si9n authored May 9, 2021
2 parents 772ea72 + 85064d8 commit 0ce6445
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 40 deletions.
29 changes: 0 additions & 29 deletions .appveyor.yml

This file was deleted.

9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ jobs:
- os: ubuntu-latest
java: 11
jobtype: 1
- os: windows-latest
java: 8
jobtype: 2
- os: ubuntu-latest
java: 11
jobtype: 2
jobtype: 3
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -34,12 +37,16 @@ jobs:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Build and test
shell: bash
run: |
case ${{ matrix.jobtype }} in
1)
bin/run-ci.sh
;;
2)
sbt -v -Dfile.encoding=UTF-8 -J-XX:ReservedCodeCacheSize=512M -Dsbt.supershell=never -J-Xms1024M -J-Xmx2048M -J-server "crossTestBridges" "zincRoot/test" "zincScriptedJVM2_12/test:run"
;;
3)
sbt -v -Dfile.encoding=UTF-8 -J-XX:ReservedCodeCacheSize=512M -J-Xms1024M -J-Xmx2048M -J-server "runBenchmarks"
;;
*)
Expand Down
8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def mimaSettings: Seq[Setting[_]] = Seq(
"1.2.2",
"1.3.0",
)
val post140: Set[String] = Set()
val post140: Set[String] = Set(
"1.4.0",
"1.5.0",
)
val versions =
if (scalaVersion.value.startsWith("2.12.")) pre140 ++ post140
else post140
Expand Down Expand Up @@ -85,6 +88,7 @@ ThisBuild / mimaPreviousArtifacts := Set.empty
// limit the number of concurrent test so testQuick works
Global / concurrentRestrictions += Tags.limit(Tags.Test, 4)
ThisBuild / semanticdbVersion := "4.4.6"
ThisBuild / Test / fork := true

def baseSettings: Seq[Setting[_]] = Seq(
resolvers += Resolver.typesafeIvyRepo("releases"),
Expand Down Expand Up @@ -299,6 +303,7 @@ lazy val zincPersistCoreAssembly = (projectMatrix in internalPath / "zinc-persis
autoScalaLibrary := false,
exportJars := true,
Compile / packageBin := (zincPersistCore / Compile / assembly).value,
mimaPreviousArtifacts := Set.empty,
)

lazy val zincPersistCore = (project in internalPath / "zinc-persist-core")
Expand Down Expand Up @@ -472,6 +477,7 @@ lazy val compilerInterface = (projectMatrix in internalPath / "compiler-interfac
exclude[ReversedMissingMethodProblem]("xsbti.compile.IncrementalCompiler.compileAllJava"),
exclude[ReversedMissingMethodProblem]("xsbti.compile.ScalaInstance.loaderCompilerOnly"),
exclude[ReversedMissingMethodProblem]("xsbti.compile.ScalaInstance.compilerJars"),
exclude[InheritedNewAbstractMethodProblem]("xsbti.InteractiveConsoleInterface.close"),
),
)
.jvmPlatform(autoScalaLibrary = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.nio.file.{ FileVisitResult, Files, Path, SimpleFileVisitor }
import java.nio.file.attribute.BasicFileAttributes
import sbt.util.Logger
import scala.reflect.io.RootPath
import sbt.internal.io.Retry

object PickleJar {
// create an empty JAR file in case the subproject has no classes.
Expand All @@ -32,7 +33,7 @@ object PickleJar {
if (!knownProducts.isEmpty) {
val pj = RootPath(pickleOut, writable = false) // so it doesn't delete the file
try Files.walkFileTree(pj.root, deleteUnknowns(knownProducts, log))
finally pj.close()
finally Retry(pj.close())
}
()
}
Expand All @@ -45,7 +46,9 @@ object PickleJar {
// "/foo/bar/wiz.sig" -> "foo/bar/wiz.class"
if (!knownProducts.contains(ps.stripPrefix("/").stripSuffix(".sig") + ".class")) {
log.debug(s"PickleJar.deleteUnknowns: visitFile deleting $ps")
Files.delete(path)
// retry to work around C:\Users\RUNNER~1\AppData\Local\Temp\sbt_f3e67bfa\dep\target\early\output.jar:
// The process cannot access the file because it is being used by another process.
Retry(Files.delete(path))
}
}
FileVisitResult.CONTINUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,10 @@ case class ProjectStructure(
val dropQuotes =
if (expected.startsWith("\"")) expected.drop(1).dropRight(1)
else expected
assert(problemMessage.contains(dropQuotes), s"'$problemMessage' doesn't contain '$dropQuotes'.")
assert(
problemMessage.contains(dropQuotes),
s"'$problemMessage' doesn't contain '$dropQuotes'."
)
case None =>
throw new TestFailed(
s"Problem not found: $index (there are ${problems.length} problem with severity $severity)."
Expand Down
2 changes: 1 addition & 1 deletion project/HouseRulesPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object HouseRulesPlugin extends AutoPlugin {
scalacOptions += "-Ywarn-value-discard",
scalacOptions ++= "-Ywarn-unused-import".ifScala(v => 11 <= v && v <= 12).value.toList
) ++ Seq(Compile, Test).flatMap(
c => scalacOptions in (c, console) --= Seq("-Ywarn-unused-import", "-Xlint")
c => (c / console / scalacOptions) --= Seq("-Ywarn-unused-import", "-Xlint")
)

private def scalaPartV = Def setting (CrossVersion partialVersion scalaVersion.value)
Expand Down
3 changes: 2 additions & 1 deletion project/Scripted.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ object Scripted {
bufferLog: Boolean,
compileToJar: Boolean,
): Unit = {
val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil)
val noJLine =
new classpath.FilteredLoader(scriptedSbtInstance.loader, "xsbti." :: "jline." :: Nil)
val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine)
val bridgeClass = Class.forName("sbt.inc.ScriptedMain$", true, loader)
val bridge = bridgeClass.getField("MODULE$").get(null).asInstanceOf[ScriptedMain]
Expand Down
4 changes: 2 additions & 2 deletions project/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ object Util {

def sampleProjectSettings(ext: String) =
Seq(
(scalaSource in Compile) := baseDirectory.value / "src",
(Compile / scalaSource) := baseDirectory.value / "src",
genTestResTask := {
def resurcesDir = (file("zinc") / "src" / "test" / "resources" / "bin").getAbsoluteFile
val target = resurcesDir / s"${name.value}.$ext"
IO.copyFile((packageBin in Compile).value, target)
IO.copyFile((Compile / packageBin).value, target)
Seq(target)
}
) ++ relaxNon212
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.9
sbt.version=1.5.1
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % "0.6.5")
libraryDependencies += "com.github.os72" % "protoc-jar" % "3.11.4" // sync w/ ProtobufConfig / version
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.18")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.5.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

0 comments on commit 0ce6445

Please sign in to comment.