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

Disable BSP in the Jmh config #207

Merged
merged 1 commit into from
Aug 19, 2021
Merged

Disable BSP in the Jmh config #207

merged 1 commit into from
Aug 19, 2021

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Jul 1, 2021

Importing a Jmh build target in IntelliJ or Metals triggers the Jmh source generation which triggers the compilation.
This is not user friendly because:

  • it takes time to import the project
  • it can compile in error and then it makes the entire import fail (we need more granularity in BSP to handle individual failures)

Importing the Jmh build target is often not useful because it shares its sources with the Compile or Test build target.

Related discussions:

Importing a Jmh build target in IntelliJ or Metals triggers
the Jmh source generation which triggers the compilation.
This is not user friendly because:
- it takes time to import the project
- it can compile in error and then it makes the entire import fail
(we need more granularity in BSP to handle individual failures)

Importing the Jmh build target is often not useful because it shares
its sources with the Compile or Test build target.
So we disable BSP in the Jmh config by default.
@adpi2
Copy link
Member Author

adpi2 commented Jul 1, 2021

Fixes #193

@eed3si9n eed3si9n merged commit 40f828c into sbt:main Aug 19, 2021
ckipp01 added a commit to ckipp01/scip-java that referenced this pull request Aug 20, 2022
This change turns `bspEnabled := false` for `Jmh` because it involves
source generation meaning that when you do a build import it will also
do the source generation which we don't want on import.

NOTE: That if there is another release of sbt-jmh ever this is done by
default not, but not yet released: sbt/sbt-jmh#207.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants