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

Release flag doesn't make compiler suggest correct completions #18726

Closed
tgodzik opened this issue Oct 19, 2023 · 1 comment · May be fixed by #20318
Closed

Release flag doesn't make compiler suggest correct completions #18726

tgodzik opened this issue Oct 19, 2023 · 1 comment · May be fixed by #20318
Assignees
Labels
area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools itype:bug

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Oct 19, 2023

Compiler version

3.3.1

with -release 8

Minimized code

"hello, world".@@

Output

Compiler will suggest completions from the current JDK and not from the JDK API. If Metals is running on JDK 11 it will still suggest repeat method which only was added in JDK 11

Expectation

This works in Scala 2, but I am not exactly sure what we would need to migrate. @SethTisue suggested this is connected to JRT.

The only thing I found that seemed related was https://github.com/scala/scala/blob/bf45e199e96383b96a6955520d7d2524c78e6e12/src/compiler/scala/tools/nsc/Global.scala#L149

So I guess the default classpath is replaced by the jrt one if release flag ispresent? This must already work to some extend in Dotty since that flag works reporting compilation errors.

@tgodzik tgodzik added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Oct 19, 2023
@nicolasstucki nicolasstucki added area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Oct 20, 2023
@Gedochao Gedochao assigned rochala and unassigned sjrd Apr 5, 2024
@Gedochao
Copy link

Gedochao commented May 6, 2024

This is actually working correctly, what remains to fix is the integration test in #20318.
I am closing this issue.

@Gedochao Gedochao closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants