scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.07k stars 323 forks source link

Re-occurring popup with error about missing Scala.js Bridge class / method #5629

Open davesmith00000 opened 1 year ago

davesmith00000 commented 1 year ago

Describe the bug

Since upgrading to Metals version 0.11.1+74-558d667d-SNAPSHOT with Bloop v1.5.11, I now get two reoccurring popups in vs code complaining about these two lines from the metals logs:

ERROR Build server error:: Referring to non-existent class org.scalajs.testing.bridge.Bridge ERROR Build server error:: Referring to non-existent method static org.scalajs.testing.bridge.Bridge.start()void

I have particularly noticed this on projects using Mill 0.11.1 instantiated with Millw, but this could be a coincidence.

Steps to reproduce:

  1. Have a Mill project with a Millw script
  2. rm -fr out
  3. Open the project in VSCode
  4. Import the project with Metals
  5. See the popups (screenshots below).
  6. Dismiss the popups

The popups may now come back. Unsure of the circumstances, might be after a project reload as I'm doing sbt plugin / Mill contrib/extension dev work at the moment. The popups will come back, but sometimes they'll sort of 'instantly dismiss themselves'.

Scala 3.3.0 Scala.js 1.13.2

Expected behavior

To not see pops if it isn't an error I need to worry about.

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

0.11.1+74-558d667d-SNAPSHOT

Extra context or search terms

image

Apologies, I'm running out of time this morning to produce a minimal build, but this is one of the ones showing the problem and it's hopefully not too complicated:

https://github.com/PurpleKingdomGames/indigo/blob/main/demos/snake/build.sc

To use it, you'll need to run bash localpublish.sh (or bash build.sh for a more thorough build) in the project root to build the plugins and libs into your local ivy2 cache.

kasiaMarek commented 1 year ago

Thanks for the report. We do not have much control over these messages in metals, those are provided by bloop and we show them "as they are". So the underlying issue should be addressed in bloop. That said, we should have Dismiss. actually remember the message and not show it again (at least in the current session).

tgodzik commented 12 months ago

I will take a look at the message itself, I haven't looked into issues with that part of Bloop yet.