Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metals keep repeatedly trigger compilation of already compiled modules #6822

Open
nafiyAix opened this issue Oct 3, 2024 · 1 comment
Open

Comments

@nafiyAix
Copy link

nafiyAix commented Oct 3, 2024

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Go to VSCode or Cursor extension market install metals plugin
  2. Git clone spark repository from https://github.com/apache/spark, here I'm using origin/branch-3.2
  3. Choose using mvn for metals to compile project
  4. After bloop server launched, start compiling, wait for all modules get compiled
  5. Click scala code under core module and use Go definition function on any code, it may trigger the compile again randomly. If there isn't anything happen, you can wait for a while, sometimes even there isn't any operation, metals would also trigger compilation of already compiled modules

Expected behavior

After 1st time compilation of whole project, wait for a while the metals log will show that it start to compile spark-core, spark-sql module, etc
And after multiple times compilation, bloop server may OOM and stuck, and metals client would also quit.

Screenshots

image

OOM after multiple times compilations (using default JVM settings here)
image

Installation:

  • Operating system: macOS
  • VSCode version: Cursor 0.41.3 or VS code 1.93.1
  • VSCode extension version: v1.39.0
  • Metals version: 1.3.5

Additional context

Search terms

@tgodzik
Copy link
Contributor

tgodzik commented Oct 7, 2024

Thanks for reporting! Those compilations are most of the time NOP, meaning nothing actually is compiled if the source code doesn't change.

The OOM is worrying so we'll have to take a look at it.

@tgodzik tgodzik transferred this issue from scalameta/metals-vscode Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

2 participants