Write a Blog >>
Fri 28 Sep 2018 14:50 - 15:00 at Frisco - Student Talks 2 Chair(s): Philipp Haller

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

Displayed time zone: Guadalajara, Mexico City, Monterrey change

14:40 - 15:00
Student Talks 2Scala 2018 at Frisco
Chair(s): Philipp Haller KTH, Sweden
Adding polymorphic functions to Scala (Student Talk)
Scala 2018
Guillaume Martres EPFL, Switzerland
Validating Changes in Typechecking on Codebases with SemanticDB (Student talk)
Scala 2018
Max Ovsiankin UC Berkeley, Eugene Burmako Twitter, Inc.