Skip to content

Commit 2bc599d

Browse files
authored
Pull in Zinc 0.10.3 (#3773)
Pulls in https://github.com/sbt/zinc/releases/tag/v1.10.3 and fixes #3748
1 parent 9aeba6d commit 2bc599d

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

build.mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ object Deps {
179179
val sourcecode = ivy"com.lihaoyi::sourcecode:0.3.1"
180180
val upickle = ivy"com.lihaoyi::upickle:3.3.1"
181181
val windowsAnsi = ivy"io.github.alexarchambault.windows-ansi:windows-ansi:0.0.5"
182-
val zinc = ivy"org.scala-sbt::zinc:1.10.2"
182+
val zinc = ivy"org.scala-sbt::zinc:1.10.3"
183183
// keep in sync with doc/antora/antory.yml
184184
val bsp4j = ivy"ch.epfl.scala:bsp4j:2.2.0-M2"
185185
val fansi = ivy"com.lihaoyi::fansi:0.5.0"

integration/invalidation/codesig-subfolder/src/CodeSigSubfolderTests.scala

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,15 @@ object CodeSigSubfolderTests extends UtestIntegrationTestSuite {
4646
// Changing stuff in subfolder/package.mill does not invalidate unrelated tasks in build.mill
4747
val cached3 = eval("foo")
4848
assert(cached3.out == "")
49-
// This should only compile 1 source but it seems there's an upstream bug in Zinc
50-
// https://github.com/sbt/zinc/issues/1461
51-
assert(cached3.err.contains("compiling 2 Scala sources"))
49+
assert(cached3.err.contains("compiling 1 Scala source"))
5250

5351
modifyFile(
5452
workspacePath / "subfolder/package.mill",
5553
_.replace("running helperFoo", "running helperFoo2")
5654
)
5755
val mangledHelperFoo = eval("foo")
5856
assert(mangledHelperFoo.out.linesIterator.toSeq == Seq("running foo2", "running helperFoo2"))
59-
// This should only compile 1 source but it seems there's an upstream bug in Zinc
60-
// https://github.com/sbt/zinc/issues/1461
61-
assert(mangledHelperFoo.err.contains("compiling 2 Scala sources"))
57+
assert(mangledHelperFoo.err.contains("compiling 1 Scala source"))
6258

6359
// Make sure changing `val`s, which only affects the Module constructor and
6460
// not the Task method itself, causes invalidation
@@ -68,9 +64,7 @@ object CodeSigSubfolderTests extends UtestIntegrationTestSuite {
6864
)
6965
val mangledValFoo = eval("foo")
7066
assert(mangledValFoo.out.linesIterator.toSeq == Seq("running foo2", "running helperFoo2"))
71-
// This should only compile 1 source but it seems there's an upstream bug in Zinc
72-
// https://github.com/sbt/zinc/issues/1461
73-
assert(mangledValFoo.err.contains("compiling 2 Scala sources"))
67+
assert(mangledValFoo.err.contains("compiling 1 Scala source"))
7468

7569
// Even modifying `val`s that do not affect the task invalidates it, because
7670
// we only know that the constructor changed and don't do enough analysis to
@@ -85,9 +79,7 @@ object CodeSigSubfolderTests extends UtestIntegrationTestSuite {
8579
"running helperFoo2"
8680
))
8781

88-
// This should only compile 1 source but it seems there's an upstream bug in Zinc
89-
// https://github.com/sbt/zinc/issues/1461
90-
assert(mangledValFooUsedInBar.err.contains("compiling 2 Scala sources"))
82+
assert(mangledValFooUsedInBar.err.contains("compiling 1 Scala source"))
9183

9284
val cached4 = eval("foo")
9385
assert(cached4.out == "")

integration/invalidation/zinc-build-compilation/src/ZincBuildCompilationTests.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ object ZincBuildCompilationTests extends UtestIntegrationTestSuite {
3131
_.replace("running helperFoo", "running helperFoo2")
3232
)
3333
val mangledHelperFoo = eval(("dummy"))
34-
// This should only compile 1 source but it seems there's an upstream bug in Zinc
35-
// https://github.com/sbt/zinc/issues/1461
36-
assert(mangledHelperFoo.err.contains("compiling 2 Scala source"))
34+
assert(mangledHelperFoo.err.contains("compiling 1 Scala source"))
3735

3836
}
3937
}

scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ class ZincWorkerImpl(
478478
ConsistentFileAnalysisStore.binary(
479479
file = path.toIO,
480480
mappers = ReadWriteMappers.getEmptyMappers(),
481+
sort = true,
481482
// No need to utilize more that 8 cores to serialize a small file
482483
parallelism = math.min(Runtime.getRuntime.availableProcessors(), 8)
483484
)

0 commit comments

Comments
 (0)