scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

document suitability of Metals for work in scala/scala repo

SethTisue opened this issue · 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.

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.

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

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.

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 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)

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.

I used 😕 + ❤️ to mean "painful irony".