[2.x] fix: Fix pipelining flags applied to unsupported Scala versions#8499
[2.x] fix: Fix pipelining flags applied to unsupported Scala versions#8499eed3si9n merged 3 commits intosbt:developfrom
Conversation
Pipelining was introduced in Scala 3.5.0 but the build was applying -Ypickle-java and -Ypickle-write flags to all Scala 3 versions when usePipelining was enabled, causing warnings on Scala 3.3.x and 3.4.x. This change adds version detection to only apply pipelining compiler flags when Scala 3.5.0 or later is used. Fixes sbt#8433 Generated-by: AI-assisted
|
@eed3si9n Can you please check this PR and give me feedback if you have any? Thanks. |
|
Thanks for the contribution, I left a comment. |
As pointed out by @eed3si9n, Scala 2.x has supported pipelining since 2020. The fix now correctly allows: - All Scala 2.x versions (pipelining supported) - Scala 3.5.0+ (pipelining added in 3.5) And only blocks Scala 3.0-3.4.x which lack pipelining support.
|
Thank you @eed3si9n for the correction! You are absolutely right - I misunderstood the issue. Scala 2.x has supported pipelining since 2020. I have updated the logic to:
The fix now uses |
|
Applied |
|
@eed3si9n Can you please merge this PR? |
|
CI didn't run for some reason, we need to approve workflows and run the CI. |
First time contributors require approve-and-run each time they change the pull request. |
When I try to sign Scala, I am getting 500 error, how I can fix this? @eed3si9n |
|
The CI scripted tests are failing with errors in
The code change is minimal and scoped to pipelining flag application. Could these be pre-existing test issues or flaky tests? |
|
Looks like CLA worked after rerunning. I'm rerunning the failing tests. |



Problem
When
usePipelining := trueis set with Scala 3.3.x or 3.4.x, sbt applies-Ypickle-javaand-Ypickle-writecompiler flags even though pipelining is only supported in Scala 3.5.0+. This causes confusing warnings:Solution
Added version check to only apply pipelining compiler flags when Scala 3.5.0 or later is detected. The check uses existing utilities (
ScalaArtifacts.isScala3andVersionNumber.matchesSemVer) following the pattern already used elsewhere in the codebase.Changes
scalacOptionssetting inDefaults.scalato check Scala version before applying pipelining flagsusePipeliningsetting is silently ignoredFixes #8433
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=162055292