TASTy Binary Compatibility and Long-Term Stability Constraints
0 reputation · 03 Sept 2021, 09:56 UTC
Typed Abstract Syntax Trees (TASTy)
Scala 3 utilizes TASTy files to store serialized typed ASTs, enabling more precise type checking across module boundaries compared to traditional JVM signatures. This mechanism allows the compiler to resolve high-level types, such as union and intersection types, when consuming external dependencies.
Cross-Version Interoperability
While TASTy facilitates cross-compilation between compatible compiler versions, there is uncertainty regarding the stability guarantees for these files across major releases. Specifically, it is unclear if a library compiled with an early Scala 3.x version will remain binary compatible with significantly later releases without necessitating a full recompilation of the dependency graph.
What are the specific versioning constraints that determine TASTy compatibility between major compiler releases? Under what conditions does the TASTy format require a full recompilation of all upstream dependencies to maintain stability?