CASTING METALS AGENDA ▸ Pre-Metals age ▸ Metals age ▸ …and beyond? Metals rich code editing for Scala in VS Code Vim Emacs By Ólafur Páll Geirsson https://www.youtube.com/watch?v=MRQMylDxBJ8
CASTING METALS 2014 - PROJECT PALLADIUM ▸ ok, macros are great… ▸ …but can be also made easier to use? ▸ You may also know Project Palladium as Scalameta (at the time, scala.meta, for assonance with scala.reflect)
CASTING METALS 2014 - SCALAMETA ▸ Announced publicly in 2014 at ScalaDays by Eugene Burmako (“Rethinking Scala Macros”) ▸ Intended as a principled foundation for meta programming, intended for use in a new macro system
CASTING METALS 2015 - SCALAMETA SYNTACTIC API ▸ By 2015, Scalameta syntactic API was ready for prime-time ▸ What is the syntactic API? ▸ Parser ▸ Data structures (Trees, Tokens) ▸ Pretty printer
CASTING METALS 2016 - SCALAFMT ▸ Code formatter for Scala, based on Scalameta ▸ Developed by Ólafur Páll Geirsson, as his master thesis at EPFL ▸ Presented at Scala Italy 2016, in Venice!
CASTING METALS 2016 - SCALAMETA SEMANTIC API ▸ The compiler knows a lot about your code ▸ Scalameta injects itself into the compiler, and it persists information about your code ▸ The information can then be re-used later on by external tools ▸ The data structure holding the information is known as Semanticdb ▸ See the very comprehensive spec https://scalameta.org/docs/semanticdb/ specification.html
CASTING METALS 2016 - MIGRATE4S SCALAFIX ▸ The idea: ▸ Scalafmt can fmt your code ▸ Scalafix can fix it ▸ Born in response to the goal of “to define a migration path from Scala 2.x to Dotty”, which came up in the first Scala Center Advisory Board meeting ▸ Authored by Ólafur, who’s at the time was a software engineer at the Scala Center
CASTING METALS NOVEMBER 2017 - SCALA.IO ▸ I had just given a presentation about Scalafix ▸ Scalafix can now migrate your code, but also warn about unwanted patterns ▸ It would be neat to have that in your editor! ▸ But how?
CASTING METALS 2016 - LANGUAGE SERVER PROTOCOL ▸ A standardisation effort made by Microsoft, in partnership with RedHat and Codenvy ▸ Created in the context of Visual Studio Code and open sourced on June 27, 2016 ▸ Extensible and “negotiable” ▸ You can implement only part of it, client and server negotiate the supported features ▸ You can extend it with custom features
CASTING METALS 2018 - POC PHASE ▸ Try doing everything! ▸ Entirely based on contributors’ free time ▸ It totally worked! Except for when it didn’t… ▸ “released” as 0.1.0
CASTING METALS 2017 - BLOOP ▸ Build server around Zinc, the Scala incremental compiler ▸ Other build tools can integrate with it ▸ Developed at the Scala Center by Jorge Vicente Cantero (in photo) and Martin Duhem
CASTING METALS 2018 - BSP ▸ Equivalent to LSP, but applied to build servers ▸ Joint effort of the Scala Center and the IntelliJ Scala team (Justin Kaeser, in photo)
CASTING METALS SCALA 3 + METALS = ▸ semanticdb-scalac compiler can be replaced by TASTY ▸ Dotty presentation compiler is developed with tooling in mind
I WILL PERSONALLY WORK WITH OTHER PEOPLE ON THE DOTTY TEAM, WITH SCALA CENTER AND WITH VIRTUSLABS TO INTEGRATE METALS WITH TASTY AND THE DOTTY PRESENTATION COMPILER Martin Odersky - September 13, 2019 CASTING METALS