Validating Changes in Typechecking on Codebases with SemanticDB (Student talk)
At Twitter, we are using automated code rewrites via Scalafix to enforce code style and to perform library and language version migrations. Such rewrites are practically useful, but they can lead to subtle changes in typechecker behavior around type inference and implicit search. In our experience, such changes may be hard to spot when diffing source files during code review and may not always be covered by tests. Therefore, we believe that there is a need in tools that would detect these changes in an automated fashion.
SemanticDB is a data model for semantic information such as symbols and types about programs in Scala and other languages. This enables an ecosystem of tools that produce and consume semantic information: SemanticDB is currently produced by Scala and Java compiler plugins provided by Scalameta, and consumed by tools like automatic code rewrites, IDEs , and semantic analyzers.
To achieve our goal, we improved SemanticDB to capture synthetic trees that represent inferred type arguments and implicit arguments, and then developed a tool that compares these synthetics before and after automated code rewrites. We used this toolchain to verify the behavior of type inference and implicit search on the core of Twitter Util - a foundational library behind the Twitter stack. Our work has been open-sourced at https://github.com/twitter/rsc.
Fri 28 Sep Times are displayed in time zone: Guadalajara, Mexico City, Monterrey change
|14:40 - 14:50|
|Adding polymorphic functions to Scala (Student Talk)|
Guillaume MartresEPFL, Switzerland
|14:50 - 15:00|
|Validating Changes in Typechecking on Codebases with SemanticDB (Student talk)|