Skip to content

[GLUTEN-11658][CORE] Restore scala.recompile.mode default to 'all' and introduce fast-build profile#11659

Merged
baibaichen merged 2 commits intomainfrom
GLUTEN-11658-restore-scala-recompile-mode
Feb 27, 2026
Merged

[GLUTEN-11658][CORE] Restore scala.recompile.mode default to 'all' and introduce fast-build profile#11659
baibaichen merged 2 commits intomainfrom
GLUTEN-11658-restore-scala-recompile-mode

Conversation

@baibaichen
Copy link
Contributor

Summary

Closes #11658

PR #11560 changed scala.recompile.mode from all to incremental, which breaks CI/clean builds because Zinc's incremental compiler does not reliably track transitive Spark dependencies, causing errors like Symbol 'type org.apache.spark.sql.internal.SqlApiConf' is missing from the classpath.

Changes

  • pom.xml: Restore scala.recompile.mode default to all (safe for CI/clean builds)
  • pom.xml: Rename the bloop profile (added in [CORE] Add Bloop integration for faster Scala incremental compilation #11645) to fast-build and add scala.recompile.mode=incremental inside it — used by bloop-setup.sh and run-scala-test.sh where Zinc analysis is warm
  • dev/bloop-setup.sh: Update -Pbloop-Pfast-build
  • dev/run-scala-test.sh: Replace 5 redundant -D skip flags with -Pfast-build; also add pathing JAR support to avoid OS command-line length limits
  • docs/developers/bloop-integration.md: Update profile name reference

Effect

Scenario recompile mode
CI / clean Maven build all (safe)
./dev/bloop-setup.sh incremental (via -Pfast-build)
./dev/run-scala-test.sh incremental (via -Pfast-build)
Manual override -Dscala.recompile.mode=incremental

Test plan

  • help:evaluate confirms default is all, fast-build profile overrides to incremental
  • mvn clean test-compile with Spark 4.1: BUILD SUCCESS in ~5 min, no classpath errors
  • run-scala-test.sh GlutenDeprecatedDatasetAggregatorSuite: 5/5 tests passed

🤖 Generated with Claude Code

@github-actions github-actions bot added CORE works for Gluten Core BUILD DOCS labels Feb 26, 2026
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen added the AI AI Related issues and PR label Feb 26, 2026
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen force-pushed the GLUTEN-11658-restore-scala-recompile-mode branch from c92398b to 02b3461 Compare February 26, 2026 11:07
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen force-pushed the GLUTEN-11658-restore-scala-recompile-mode branch from 02b3461 to b9e300e Compare February 26, 2026 14:18
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen force-pushed the GLUTEN-11658-restore-scala-recompile-mode branch from b9e300e to addef18 Compare February 26, 2026 14:38
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@github-actions github-actions bot added the INFRA label Feb 26, 2026
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

baibaichen and others added 2 commits February 27, 2026 05:27
…d introduce fast-build profile

- Restore scala.recompile.mode default from 'incremental' back to 'all'
  to fix CI/clean build failures caused by Zinc's incremental compiler
  not tracking transitive Spark dependencies correctly

- Rename the 'bloop' Maven profile (added in #11645) to 'fast-build' and
  add scala.recompile.mode=incremental inside it; used by bloop-setup.sh
  and run-scala-test.sh where Zinc analysis is warm and reliable

- Simplify run-scala-test.sh: replace 5 redundant -D skip flags with
  -Pfast-build profile activation

- Add pathing JAR support in run-scala-test.sh to avoid OS command-line
  length limits when classpath is very long

Closes #11658

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Problem: scala-maven-plugin 4.9.2 changed behavior for Scala >= 2.12 builds.
When maven.compiler.target is set (e.g. "1.8"), it now passes the value to
computeBytecodeVersionOptions() [1] which injects '-release 1.8' into scalac
args. The scalac '-release' flag is only supported on Java 9+, so building
under JDK 8 with recompileMode=all (restored by the parent commit) fails with:
  scalac error: -release is only supported on Java 9 and higher

Root cause: PR #11645 (which introduced scala-maven-plugin 4.9.2) also set
recompileMode=incremental, which routes through Zinc's SbtIncrementalCompiler
and bypasses computeBytecodeVersionOptions(). Restoring recompileMode=all
exposes the 4.9.2 regression for Java 8 builds.

Fix: in the java-8 profile, pin scala.compiler.version to 4.8.0, which does
not have this regression. Java 9+ builds continue to use 4.9.2 unaffected.

[1] https://github.com/davidB/scala-maven-plugin/blob/4.9.2/src/main/java/scala_maven/ScalaMojoSupport.java#L620-L648

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@baibaichen baibaichen force-pushed the GLUTEN-11658-restore-scala-recompile-mode branch from a94455c to 9adfadf Compare February 27, 2026 05:32
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen merged commit 07e7232 into main Feb 27, 2026
61 checks passed
@baibaichen baibaichen deleted the GLUTEN-11658-restore-scala-recompile-mode branch February 27, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI Related issues and PR BUILD CORE works for Gluten Core DOCS INFRA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore scala.recompile.mode default to 'all' and introduce fast-build profile

2 participants