You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/08/19 09:10:00 UTC

[PR] [SPARK-58867][BUILD] Add Scala initialization checks to build [spark]

zhengruifeng opened a new pull request, #58112:
URL: https://github.com/apache/spark/pull/58112

   ### What changes were proposed in this pull request?
   
   This PR adds `-Xcheckinit` to Spark's Scala compiler options for both SBT and Maven builds.
   
   ### Why are the changes needed?
   
   `-Xcheckinit` instruments Scala code to detect reads of uninitialized vals at runtime. This helps
   catch problematic initialization-order patterns, such as eager trait initializers reading subclass
   fields before those fields have been initialized.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Not run. This is a build configuration change.
   
   `git diff --check`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI GPT-5 Codex
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org