Skip to content

Refactor: Standardize constant naming to SCREAMING_SNAKE_CASE (#481)#583

Closed
yemsy26 wants to merge 1 commit intozio:developfrom
yemsy26:fix/481-screaming-snake-case
Closed

Refactor: Standardize constant naming to SCREAMING_SNAKE_CASE (#481)#583
yemsy26 wants to merge 1 commit intozio:developfrom
yemsy26:fix/481-screaming-snake-case

Conversation

@yemsy26
Copy link
Copy Markdown

@yemsy26 yemsy26 commented Apr 1, 2026

/claim #481

Refactoring Constant Naming to SCREAMING_SNAKE_CASE

This PR standardizes the naming of all �al and inal val constants in object containers to follow the SCREAMING_SNAKE_CASE convention as per modern Scala standards.

Architectural Approach

Constants were identified and classified into three tiers to guarantee seamless backward compatibility:

Tier Visibility Approach Files
A Public API Renamed + added @deprecated("3.1.0") aliases LightTypeTag.scala, LightTypeTagRef.scala
B Package-Private Renamed + added @deprecated("3.1.0") aliases LightTypeTagInheritance.scala
C Internal/Shaded Surgically renamed directly TagMacro.scala, BufferProvider.scala, BufferPool.scala

(Note: Backtick properties in DebugProperties were excluded as they represent specific JVM system properties).

Macro Safety

Special care was taken for currentBinaryFormatVersion and LambdaConstants.tagMacro which are embedded by macros at compile-time. We updated the macro emitters (LightTypeTagMacro.scala, Inspect.scala, and TagMacro.scala) simultaneously to reference the new conventions explicitly. The @deprecated forwarders securely retain binary compatibility.

Verification

  • Fully green sbt test via cs launch sbt -- test runs for the core module.

Includes deprecated aliases for public and package-private API constants to preserve binary and source compatibility.
@yemsy26
Copy link
Copy Markdown
Author

yemsy26 commented Apr 1, 2026

I've recorded a short walkthrough showing the refactored constants, the deprecated aliases for binary compatibility, and the successful execution of the full test suite.

Watch here: https://youtu.be/oCLTlZVTwB8

Everything is in green. Ready for review! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants