Skip to content

No completions from standard library symbols #9760

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

Closed
tgodzik opened this issue Sep 9, 2020 · 2 comments
Closed

No completions from standard library symbols #9760

tgodzik opened this issue Sep 9, 2020 · 2 comments

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Sep 9, 2020

Minimized code

In Metals we are reusing the Dotty language server code in the form of:

 val uri = params.uri
      val sourceFile = CompilerInterfaces.toSource(params.uri, params.text)
      driver.run(uri, sourceFile)

      given ctx as Context = driver.currentCtx
      val pos = sourcePosition(driver, params, uri)
      val items = driver.compilationUnits.get(uri) match {
        case Some(unit) =>
          Completion.completions(pos)(using ctx.fresh.setCompilationUnit(unit))._2
        case None => Nil
      }

Currently though when trying to complete for example:

object A
  prin

we are not getting any completions. This regressed in 0.27.0-RC1.

Expected would for example print or println. This seems to have happened to anything that is not in a local scope.

prolativ added a commit to prolativ/dotty that referenced this issue Sep 16, 2020
prolativ added a commit to prolativ/dotty that referenced this issue Sep 24, 2020
prolativ added a commit to prolativ/dotty that referenced this issue Sep 24, 2020
prolativ added a commit to prolativ/dotty that referenced this issue Oct 1, 2020
smarter added a commit that referenced this issue Oct 1, 2020
…ompletion

Fix standard library symbols completion (solves #9760)
@prolativ
Copy link
Contributor

This issue was fixed by #9805 and should be closed

@tgodzik
Copy link
Contributor Author

tgodzik commented Nov 10, 2020

I can confirm, let's close it! 🎉

@tgodzik tgodzik closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants