1.10.3
Protobuf with potential Denial of Service (CVE-2024-7254)
Zinc 1.10.3 updates protobuf-java library to 3.25.5 to address CVE-2024-7254 / GHSA-735f-pc8j-v9w8, which states that while parsing unknown fields in the Protobuf Java library, a maliciously crafted message can cause a StackOverflow error. Given the nature of how Protobuf is used in Zinc as internal serialization, we think the impact of this issue is minimum. However, security software might still flag this to be an issue while using sbt or Zinc, so upgrade is advised. This issue was originally reported by @gabrieljones and was fixed by @Friendseeker in #1443.
@adpi2 at Scala Center has also configured dependency graph submission to get security alerts in #1448.
Reverting the invalidation of circular-dependent sources
Zinc 1.10.3 reverts the initial invalidation of circular-dependent pairs.
There's been a series of incremental compiler bugs such as "Invalid superClass" and "value b is not a member of A" that would go away after clean
. The root cause of these bugs were identified by @smarter (#598 (comment)) and @Friendseeker to be partial compilation of circular-dependent sources where two sources A.scala
and B.scala
use some constructs from each other.
Zinc 1.10.0 fixed this issue via #1284 by invalidating the circular-dependent pairs together. In other words, if A.scala
was changed, it would immediately invalidate B.scala
. It turns out, that people have been writing circular-dependent code, and this has resulted in multiple reports of Zinc's over-compilation (#1420, #1461). Given that the invalidation seems to affect the users more frequently than the original bug, we're going to revert the fix for now. We might bring this back with an opt-out flag later on. The revert was contributed by by @lihaoyi in #1462.
Improvement: ParallelGzipOutputStream
Zinc 1.10.0 via #1326 added a new consistent (repeatable) formats for Analysis storage. As a minor optimization, the pull request also included an implementation of ParallelGzipOutputStream
, which would reduce the generate file size by 20%, but with little time penalty. Unfortunately, however, we have observed in CI that that the scala.concurrent.Future
-based implementation gets stuck in a deadlock. @Ichoran and @Friendseeker have contributed an alternative implementation that uses Java threads directly, which fixes the issue in #1466.
Other updates
- fix: Fixes transitive invalidation interfering with cycle stopping condition by @Friendseeker in #1397
- Emit
SourceInfos
when incremental compilation fails by @Friendseeker in #1306 - Add log for third class invalidation by @Friendseeker in #1413
- fix: Generates
AbstractZincFile
during-sourcepath
workflow by @Friendseeker in #1309 - fix: Handle parsing of non-problems in
JavaErrorParser
by @Friendseeker in #1455 - fix: Handle
DependencyByMacroExpansion
inConsistentAnalysisFormat
by @Friendseeker in #1434 - fix: Backport dummy output jar handling for Consistent Analysis Format by @Friendseeker in #1463
Behind the scene
- refactor: Removes unused
java.util.zip.ZipError
import by @Friendseeker in #1460 - refactor: Uses
hashCode
instead of XOR hash inextraHash
computation by @Friendseeker in #1405 - refactor: Regenerate contraband Java files by @Friendseeker in #1450
- refactor: Clean compile warnings by @Friendseeker in #1472
- refactor: Avoid deprecated collection.mutable.MultiMap by @xuwei-k in #1474
- refactor: Avoid deprecated
mutable.OpenHashMap
by @xuwei-k in #1475 - test: Run
AnalysisFormatBenchmark
during CI by @Friendseeker in #1408 - test: Add missing condition for
AnalysisFormatBenchmark
CI run by @Friendseeker in #1409 - deps: Update util to 1.10.3 by @eed3si9n in #1473
- deps: Update scalacheck to 1.18.1 by @scala-steward in #1403
- deps: Update scala-compiler, scala-library to 2.12.20 by @scala-steward in #1392
- deps: Update scala-compiler, scala-library to 2.13.15 by @scala-steward in #1446
- deps: Update sbt-contraband to 0.6.0 by @scala-steward in #1447
- ci: Update sbt-pgp to 2.3.0 by @scala-steward in #1445
- ci: Configure Scala Steward not to update
jgit
version by @Friendseeker in #1415 - ci: Fix typo in
ci.yml
by @Friendseeker in #1437 - ci: Add 25 minute timeout for CI by @Friendseeker in #1435
- ci: Adds setup-sbt by @Friendseeker in #1449
- ci: Removes unnecessary setup-sbt step by @Friendseeker in #1459
- Make
zinc-scripted
show up in IntelliJ by @Friendseeker in #1416
New contributors
Full Changelog: v1.10.2...v1.10.3