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

Port pc find references from metals #20544

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Conversation

kasiaMarek
Copy link
Contributor

@@ -1341,12 +1341,14 @@ object Build {
BuildInfoPlugin.buildInfoDefaultSettings

def presentationCompilerSettings(implicit mode: Mode) = {
val mtagsVersion = "1.3.1"
val mtagsVersion = "1.3.1+63-1a8f4659-SNAPSHOT"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should wait for a stable metals release.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can update to 1.3.2 now 🎉

@jchyb
Copy link
Contributor

jchyb commented Jun 21, 2024

Looks like there is an issue with java compat in the compiler - symbol that seems to be supposed to point to scala.meta.pc.VirtualFileParams is lost after the transform phases. I'll try to fix that

driver.run(uri, source)
given ctx: Context = driver.currentCtx

val unit = driver.currentCtx.run.units.head
Copy link
Contributor

Choose a reason for hiding this comment

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

quickfix:

Suggested change
val unit = driver.currentCtx.run.units.head
private val run = driver.currentCtx.run
val unit = run.units.head

(I was incorrect before about the java compat thing). This is ending up a bit hard to minimize since it both depends on the bootstrapped scala compiler and has to be compiled by it (nonbootstrapped works fine). My attempts to have it crash with scala3-bootstrapped/scalac -with-compiler are also proving unsuccessful. I might not be able to come up with the minimization after all, but the quick fix should help

@kasiaMarek kasiaMarek marked this pull request as ready for review June 24, 2024 13:18
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@tgodzik tgodzik merged commit cf55fba into scala:main Jun 24, 2024
24 checks passed
@Kordyjan Kordyjan added this to the 3.5.1 milestone Jul 3, 2024
WojciechMazur added a commit that referenced this pull request Jul 10, 2024
Backports #20544 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

5 participants