Skip to content

Commit b650220

Browse files
Merge pull request #126 from alexarchambault/merge-upstream
Merge upstream changes
2 parents 717d710 + 30eb555 commit b650220

File tree

17 files changed

+88
-66
lines changed

17 files changed

+88
-66
lines changed

.github/setup-test-projects.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd frontend/src/test/resources/
66
for d in *; do
77
if test -f "$d/build.sbt"; then
88
cd "$d"
9-
sbt bloopInstall
9+
sbt "-DbloopVersion=1.4.11-9-827a32e7" bloopInstall
1010
cd -
1111
fi
1212
done

build.sbt

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import build.BuildImplementation.BuildDefaults
2+
import build.BuildImplementation.jvmOptions
23
import scala.util.Properties
34

45
inThisBuild(
@@ -57,10 +58,10 @@ val scalafixSettings: Seq[Setting[_]] = Seq(
5758
)
5859

5960
lazy val shared = project
60-
.settings(scalafixSettings)
6161
.settings(
6262
sonatypeSetting,
6363
name := "bloop-shared",
64+
scalafixSettings,
6465
libraryDependencies ++= Seq(
6566
Dependencies.jsoniterCore,
6667
Dependencies.jsoniterMacros,
@@ -80,12 +81,12 @@ import build.Dependencies
8081

8182
lazy val backend = project
8283
.enablePlugins(BuildInfoPlugin)
83-
.settings(scalafixSettings)
84-
.settings(testSettings ++ testSuiteSettings)
8584
.dependsOn(shared)
8685
.settings(
8786
sonatypeSetting,
8887
name := "bloop-backend",
88+
scalafixSettings,
89+
testSettings ++ testSuiteSettings,
8990
buildInfoPackage := "bloop.internal.build",
9091
buildInfoKeys := Seq[BuildInfoKey](
9192
Keys.scalaVersion,
@@ -95,7 +96,7 @@ lazy val backend = project
9596
libraryDependencies ++= List(
9697
Dependencies.nailgun,
9798
Dependencies.scalazCore,
98-
Dependencies.scalazConcurrent,
99+
Dependencies.coursierInterface,
99100
Dependencies.libraryManagement,
100101
Dependencies.sourcecode,
101102
Dependencies.monix,
@@ -129,7 +130,6 @@ lazy val tmpDirSettings = Def.settings(
129130
}
130131
)
131132

132-
import build.BuildImplementation.jvmOptions
133133
// For the moment, the dependency is fixed
134134
lazy val frontend: Project = project
135135
.dependsOn(
@@ -138,27 +138,9 @@ lazy val frontend: Project = project
138138
)
139139
.enablePlugins(BuildInfoPlugin)
140140
.configs(IntegrationTest)
141-
.settings(scalafixSettings)
142141
.settings(
143142
sonatypeSetting,
144-
testSettings,
145-
testSuiteSettings,
146-
Defaults.itSettings,
147143
BuildDefaults.frontendTestBuildSettings,
148-
(Test / unmanagedResources / includeFilter) := {
149-
new FileFilter {
150-
def accept(file: File): Boolean = {
151-
val abs = file.getAbsolutePath
152-
!(
153-
abs.contains("scala-2.12") ||
154-
abs.contains("classes-") ||
155-
abs.contains("target")
156-
)
157-
}
158-
}
159-
}
160-
)
161-
.settings(
162144
name := "bloop-frontend",
163145
bloopName := "bloop",
164146
(Compile / run / mainClass) := Some("bloop.Cli"),
@@ -192,16 +174,16 @@ lazy val frontend: Project = project
192174
Dependencies.logback
193175
)
194176
)
177+
.disablePlugins(ScalafixPlugin)
195178

196179
val jsBridge1Name = "bloop-js-bridge-1"
197180
lazy val jsBridge1 = project
198181
.dependsOn(frontend % Provided, frontend % "test->test")
199182
.in(file("bridges") / "scalajs-1")
200-
.disablePlugins(ScalafixPlugin)
201-
.settings(testSettings)
202183
.settings(
203184
sonatypeSetting,
204185
name := jsBridge1Name,
186+
testSettings,
205187
libraryDependencies ++= List(
206188
Dependencies.scalaJsLinker1,
207189
Dependencies.scalaJsLogging1,
@@ -217,10 +199,10 @@ lazy val nativeBridge04 = project
217199
.dependsOn(frontend % Provided, frontend % "test->test")
218200
.in(file("bridges") / "scala-native-0.4")
219201
.disablePlugins(ScalafixPlugin)
220-
.settings(testSettings)
221202
.settings(
222203
sonatypeSetting,
223204
name := nativeBridge04Name,
205+
testSettings,
224206
libraryDependencies += Dependencies.scalaNativeTools04,
225207
(Test / javaOptions) ++= jvmOptions,
226208
(Test / fork) := true

frontend/src/main/scala/bloop/data/Project.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import com.typesafe.config.ConfigException
2828
import com.typesafe.config.ConfigFactory
2929
import com.typesafe.config.ConfigParseOptions
3030
import com.typesafe.config.ConfigSyntax
31+
import scalaz.Cord
3132
import xsbti.compile.ClasspathOptions
3233
import xsbti.compile.CompileOrder
3334

@@ -274,7 +275,10 @@ final case class Project(
274275
object Project {
275276
private implicit val filter: DebugFilter.All.type = DebugFilter.All
276277
final implicit val ps: scalaz.Show[Project] =
277-
new scalaz.Show[Project] { override def shows(f: Project): String = f.name }
278+
new scalaz.Show[Project] {
279+
override def shows(f: Project): String = f.name
280+
override def show(f: Project): Cord = Cord(shows(f))
281+
}
278282

279283
final class ProjectReadException(msg: String, cause: Throwable)
280284
extends RuntimeException(msg, cause)

frontend/src/main/scala/bloop/engine/tasks/compilation/CompileResult.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import bloop.reporter.Problem
1010
import bloop.task.Task
1111
import bloop.util.CacheHashCode
1212

13+
import scalaz.Cord
14+
1315
sealed trait CompileResult[+R] {
1416
def result: R
1517
}
@@ -134,5 +136,6 @@ object FinalCompileResult {
134136
}
135137
}
136138
}
139+
override def show(f: FinalCompileResult): Cord = Cord(shows(f))
137140
}
138141
}

frontend/src/test/resources/compiler-plugin-allowlist/project/plugins.sbt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.3.7")
44
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.1")
55
addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.5.3")
66

7-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
7+
val pluginVersion = sys.props.getOrElse(
8+
"bloopVersion",
9+
throw new RuntimeException("Unable to find -DbloopVersion")
10+
)
11+
12+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
13+
814
updateOptions := updateOptions.value.withLatestSnapshots(false)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0")
22
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3")
33

4-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
4+
val pluginVersion = sys.props.getOrElse(
5+
"bloopVersion",
6+
throw new RuntimeException("Unable to find -DbloopVersion")
7+
)
8+
9+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
10+
511
updateOptions := updateOptions.value.withLatestSnapshots(false)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
22
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.26")
33

4-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
4+
val pluginVersion = sys.props.getOrElse(
5+
"bloopVersion",
6+
throw new RuntimeException("Unable to find -DbloopVersion")
7+
)
8+
9+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
10+
511
updateOptions := updateOptions.value.withLatestSnapshots(false)
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
22
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.1")
33

4-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
4+
val pluginVersion = sys.props.getOrElse(
5+
"bloopVersion",
6+
throw new RuntimeException("Unable to find -DbloopVersion")
7+
)
8+
9+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
510
updateOptions := updateOptions.value.withLatestSnapshots(false)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
22
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.1")
33

4-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
4+
val pluginVersion = sys.props.getOrElse(
5+
"bloopVersion",
6+
throw new RuntimeException("Unable to find -DbloopVersion")
7+
)
8+
9+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
10+
511
updateOptions := updateOptions.value.withLatestSnapshots(false)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.11-9-827a32e7")
1+
val pluginVersion = sys.props.getOrElse(
2+
"bloopVersion",
3+
throw new RuntimeException("Unable to find -DbloopVersion")
4+
)
5+
6+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % pluginVersion)
7+
28
updateOptions := updateOptions.value.withLatestSnapshots(false)

0 commit comments

Comments
 (0)