scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

document suitability of Metals for work in scala/scala repo

Open SethTisue opened this issue 5 years ago • 7 comments

I asked about this in two chat rooms, scala/contributors Gitter and internal Slack. I'll summarize here, and then we can use this ticket to collect further experience reports, tips, etc.

SethTisue avatar Feb 19 '20 20:02 SethTisue

in response to me asking on Gitter:

  • @bishabosha: "I use metals and vscode to develop on a fork of scala/scala, it takes about 8 minutes to warm up on the first time opening the project" (some discussion ensued about whether it's normal for it to take that long)

and when I asked on Slack:

  • @lrytz: "it did work for me last time i tried, importing and basic functionality, both 2.12 and 2.13"
    • but he also added: "for me the debugger is probably the killer feature (of IntelliJ). set a breakpoint somewhere deep in the type checker and click up the call graph to see how the tree is being handled, what branches are taken. break at an error message, etc. i use it all the time, also to learn parts of the codebase that i'm not familiar with"
    • work on debugging support in Metals in underway, but it will be a while before it's anywhere near on par with IntelliJ; see https://github.com/scalacenter/advisoryboard/blob/master/proposals/022-jsr-45.md
    • @eed3si9n observed that "for Metals, other complication specific to scala/scala might be we probably won't have the semanticdb in between major versions", but with 2.14 not happening, we may never have that problem

so that's what we have so far. it's good to know that at least two people have found it to work.

SethTisue avatar Feb 20 '20 22:02 SethTisue

I should note that I do use VS Code + Metals for scala/scala, but mostly from habit I use it like an editor. After the indexing is done, navigation does work well:

RefChecks_scala

eed3si9n avatar Feb 20 '20 22:02 eed3si9n

I use metals + vscode on windows. It takes a long time indexing. It also times out its connection during initialization. That's fine, just press "connect to build server" after a bit. Once it's done, navigation works great.

martijnhoekstra avatar Sep 10 '20 17:09 martijnhoekstra

On 2.12.x after the initial import Metals Doctor told me that semanticdb wasn't working. After closing and reopening the project that seems to be tentatively fixed.

I still have this issue that Metals seems to be in some kind of feedback loop: Screen-Recording-2022-04-26-at-1

I'm using sbt as the compile server.

Jasper-M avatar Apr 26 '22 11:04 Jasper-M

@Jasper-M is the problem 2.12.x specific? (fwiw, our typical 2.12.x workflow these days is to do the actual development on 2.13.x, then backport it)

SethTisue avatar Apr 26 '22 14:04 SethTisue

is the problem 2.12.x specific?

Didn't find the courage yet to switch branches and go through the importing cycle again.

As you probably figured out I was in fact backporting a 2.13.x PR.

Jasper-M avatar Apr 26 '22 14:04 Jasper-M

I used :confused: + :heart: to mean "painful irony".

som-snytt avatar Apr 26 '22 15:04 som-snytt