Skip to content

Bump to sbt 1.5.0 #11844

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

Merged
merged 4 commits into from
Apr 8, 2021
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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,9 @@ jobs:
- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Test sbt 1.4.x
- name: Test sbt
run: ./project/scripts/sbt "sbt-dotty/scripted; sbt-community-build/scripted"

- name: Test sbt 1.5.x
run: ./project/scripts/sbt "set \`sbt-dotty\`/scriptedSbt := \"1.5.0-RC1\"; sbt-dotty/scripted sbt-dotty/*"

test_java8:
runs-on: [self-hosted, Linux]
container:
Expand Down
2 changes: 1 addition & 1 deletion community-build/community-projects/stdLib213
Submodule stdLib213 updated 705 files
14 changes: 7 additions & 7 deletions community-build/src/scala/dotty/communitybuild/projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ final case class SbtCommunityProject(
scalacOptions.map("\"" + _ + "\"").mkString("List(", ",", ")")

private val baseCommand =
"clean; set logLevel in Global := Level.Error; set updateOptions in Global ~= (_.withLatestSnapshots(false)); "
++ (if scalacOptions.isEmpty then "" else s"""set scalacOptions in Global ++= $scalacOptionsString;""")
"clean; set Global/logLevel := Level.Error; set Global/updateOptions ~= (_.withLatestSnapshots(false)); "
++ (if scalacOptions.isEmpty then "" else s"""set Global/scalacOptions ++= $scalacOptionsString;""")
++ s"++$compilerVersion!; "

override val testCommand =
"""set testOptions in Global += Tests.Argument(TestFramework("munit.Framework"), "+l"); """
"""set Global/testOptions += Tests.Argument(TestFramework("munit.Framework"), "+l"); """
++ s"$baseCommand$sbtTestCommand"

override val publishCommand =
Expand All @@ -124,7 +124,7 @@ final case class SbtCommunityProject(
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
case _ => Nil
extraSbtArgs ++ sbtProps ++ List(
"-sbt-version", "1.4.9",
"-sbt-version", "1.5.0",
"-Dsbt.supershell=false",
s"-Ddotty.communitybuild.dir=$communitybuildDir",
s"--addPluginSbtFile=$sbtPluginFilePath"
Expand All @@ -140,12 +140,12 @@ object projects:

private def forceDoc(projects: String*) =
projects.map(project =>
s""";set $project/Compile/doc/sources ++= ($project/Compile/doc/tastyFiles).value ;$project/doc"""
s""";set $project/Compile/doc/sources ++= ($project/Compile/doc/dotty.tools.sbtplugin.DottyPlugin.autoImport.tastyFiles).value ;$project/doc"""
).mkString(" ")

private def aggregateDoc(in: String)(projects: String*) =
val tastyFiles =
(in +: projects).map(p => s"($p/Compile/doc/tastyFiles).value").mkString(" ++ ")
(in +: projects).map(p => s"($p/Compile/doc/dotty.tools.sbtplugin.DottyPlugin.autoImport.tastyFiles).value").mkString(" ++ ")
s""";set $in/Compile/doc/sources ++= file("a.scala") +: ($tastyFiles) ;$in/doc"""

lazy val utest = MillCommunityProject(
Expand Down Expand Up @@ -512,7 +512,7 @@ object projects:

lazy val cats = SbtCommunityProject(
project = "cats",
sbtTestCommand = "set scalaJSStage in Global := FastOptStage;buildJVM;validateAllJS",
sbtTestCommand = "set Global/scalaJSStage := FastOptStage;buildJVM;validateAllJS",
sbtPublishCommand = "catsJVM/publishLocal;catsJS/publishLocal",
dependencies = List(discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations),
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init") // disable -Ysafe-init, due to -Xfatal-warning
Expand Down
3 changes: 3 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,9 @@ object Build {
baseDirectory.value / "../language-server/src/dotty/tools/languageserver/config",
sbtTestDirectory := baseDirectory.value / "sbt-test",

// ensure that sbt-dotty is built on sbt 1.4
pluginCrossBuild / sbtVersion := "1.4.9",

// The batch mode accidentally became the default with no way to disable
// it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
// We enable it explicitly here to make it clear that we're using it.
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.0