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

Compilation triggered repeatedly with no results using SBT BSP #6896

Open
antonsviridov-src opened this issue Oct 30, 2024 · 0 comments
Open

Comments

@antonsviridov-src
Copy link

Describe the bug

  1. checkout this branch: https://github.com/disneystreaming/smithy4s/compare/series/0.18...keynmol:smithy4s:test-sbt-bsp-query?expand=1
  2. import the project using SBT BSP
  3. observe infinite recompilation

The branch is special because it enables a plugin that computes a single setting - bspEnabled: https://github.com/indoorvivants/sbt-bspquery/blob/main/mod/sbt-plugin/src/main/scala/SbtBspQueryPlugin.scala#L27, conditionally disabling some projects from the import

image

The BSP logs don't offer any insights

ceived notification 'build/taskStart'
Params: {
  "taskId": {
    "id": "1374",
    "parents": []
  },
  "eventTime": 1730290542519,
  "message": "Compiling core",
  "dataKind": "compile-task",
  "data": {
    "target": {
      "uri": "file:/Users/velvetbaldmime/projects/smithy4s/#core/Compile"
    }
  }
}


[Trace - 00:15:42 pm] Received notification 'build/taskFinish'
Params: {
  "taskId": {
    "id": "1374",
    "parents": []
  },
  "eventTime": 1730290542522,
  "message": "Compiled core",
  "status": 1,
  "dataKind": "compile-report",
  "data": {
    "target": {
      "uri": "file:/Users/velvetbaldmime/projects/smithy4s/#core/Compile"
    },
    "errors": 0,
    "warnings": 0,
    "time": 3,
    "noOp": true
  }
}
// again and again and again

Expected behavior

The project is imported normally and compiled only once

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.4.0

Extra context or search terms

sbt bsp compilation trigger

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