Awesome experience with scala    on eclipse

Questions!

Go to sli.do

 

Enter code 8815

 

Ask your questions!

 

Or let's do it traditionally at the end.

Why am I Here?

Currently working on Metals as one of the main contributors as a part of the collaboration between VirtusLab and Scala Center.

Who is working on metals?

and many more contributors from the community!

Metals - Scala language server with rich ide features

Your favourite language in you favourite Editor

How does it work?

How does it work?

Pieces to the puzzle

- Build tools

- semantic information

- Scala presentation compiler

Pieces to the puzzle

- Build tools <- A LOT OF THEM

- semantic information

- SCALA PRESENTATION COMPILER

Build tools

Mill

Seed

Build tools

Mill

Seed

Bloop

- Bloop is a Scala build server

- Serves requests via build server protocol

- gives us information about the build

- uses json configuration files

 

 

Pieces to the puzzle

- Build tools <- connects VIA BSP

- semantic information 

- SCALA PRESENTATION COMPILER

Pieces to the puzzle

- Build tools <- CONNECTS VIA BSP

- semantic information <- semanticDB, but on compile...

- SCALA PRESENTATION COMPILER

Compile on save

- "hot" Bloop compiler

- fast feedback

- same errors as in the build tool

- SemanticDB files created

Compile on save

Pieces to the puzzle

- Build tools <- CONNECTS VIA BSP

- semantic information <- semanticDB, we have bloop!

- SCALA PRESENTATION COMPILER

Pieces to the puzzle

- Build tools <- CONNECTS VIA BSP

- semantic information <- semanticDB, we have bloop!

- SCALA PRESENTATION COMPILER <- can end up in bad state

Scala presentation compiler

- We get it for free by depending on the scala compiler

- Used by Ammonite, Repl, ScalaIDE

- we can discard it whenever we want

- run in a separate thread

Pieces to the puzzle

- Build tools <- CONNECTS VIA BSP

- semantic information <- semanticDB, we have bloop!

- SCALA PRESENTATION COMPILER <- Discard thread with Pc

What is already implemented

- completions

-hover

- signature Help

- go to definition

- references

-diagnostics

-document Highlight

- document Symbol

- folding Range

- FORMATTING
 - RANGE FORMATTING
- ON TYPE FORMATTING

- document Highlight

- tons of smaller features

 

In snapshot:

- implementation
- codeLens

- run/test

Metals in action - Completions

Metals in action - Definition/hover

Works also in eclipse Theia!

Go to:

 

https://gitpod.io/#https://github.com/tgodzik/metals-mill-sample

 

and try Metals for yourself!

New!

Available in latest SNAPSHOT

easier import

  1. Metals sends information about SemanticDB version.
  2. Bloop tries to resolve it and adds to workspace settings.
  3. SemanticDB files are created on compile.

 

Goto implementation

- new class inheritance index

- no noticable impact on indexing

- works with overloaded methods

- for workspace and library symbols

Goto implementation

Debug adapter protocol

- GENERIC DEBUGGER FOR A DEVELOPMENT TOOL 

- implemented in Bloop

- Metals serves as proxy

- currently only run/test

 

Debug adapter protocol

run/test

Next on the roadmap

- go to type definition

- rename symbol

- debugging with breakpoints

- better test interface

- dotty (Scala 3) support

- pants support

 

Future work

Questions?

Recent Scala Days talk by Ólafur Páll Geirsson https://www.youtube.com/watch?v=MRQMylDxBJ8


Metals documentation:

https://scalameta.org/metals/

 

Bloop documentation:

https://scalacenter.github.io/bloop/

 

Shout at me on Twitter: @TomekGodzik  

Questions?

Awesome experience with Scala on Eclipse

By Tomek Godzik

Awesome experience with Scala on Eclipse

  • 149