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

improvement: Small fixes to allow using Metals with scaladoc with sbt #16816

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Feb 2, 2023

This would require just setting bspEnabled := true, but not for sjsJUnitTests which seem to cause inifinite loop of compilations.

I also need to work a bit on Bloop to also make it work.

This still needs scalameta/metals#4938

@@ -1,7 +1,4 @@
// Used by VersionUtil to get gitHash and commitDate
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "4.11.0.201803080745-r"


Compile / unmanagedSourceDirectories +=
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is no longer needed and was causing some issues when importing all projects within sbt.

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is this supposed to be working when using Bloop or sbt as your build server? I was excited to try this out, but sbt as your server won't work since bspEnabled := false is still brought in by commonBootstrappedSettings and trying with Bloop still just results in the following for me:

2023.02.06 17:06:29 WARN  no build target for: /Users/ckipp/Documents/scala-workspace/dotty/scaladoc/src/dotty/tools/scaladoc/DRI.scala

I'm using 0.11.10+114-19c22191-SNAPSHOT so I should have the changes necessary in Metals.

@tgodzik
Copy link
Contributor Author

tgodzik commented Feb 6, 2023

This should work in sbt, there is an issue with Bloop that's related to the bridges PR that Alex created (though I hope to make an easier approach here).

I was excited to try this out, but sbt as your server won't work since bspEnabled := false is still brought in by commonBootstrappedSettings

You need to set it to true, I didn't want to change it since for most people working on the compiler it might mean a lot mroe compilations (I think 3 times compiling the compiler?)

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a note, but other than that, LGTM! I just did #16846 with this ha, since I've been wanting to tackle that for a while but was annoyed without editor help. So thanks!

project/Build.scala Show resolved Hide resolved
This would require just setting `bspEnabled := true`, but not for sjsJUnitTests which seem to cause inifinite loop of compilations.

I also need to work a bit on Bloop to also make it work.

This still needs scalameta/metals#4938
Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

project/Build.scala Show resolved Hide resolved
@tgodzik tgodzik merged commit 2fe4081 into scala:main Feb 8, 2023
@tgodzik tgodzik deleted the support-scaladoc branch February 8, 2023 19:03
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