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

not able to show the code documentation of asInstanceOf and other synthetic methods #6153

Open
robstoll opened this issue Feb 22, 2024 · 5 comments
Labels
bug Something that is making a piece of functionality unusable

Comments

@robstoll
Copy link

Describe the bug

I would like to be able to see the documentation of asInstanceOf.
Most likely it is not shown since Any.class is a synthetic class and not present in the scala-library.jar neither in scala-library-sources.jar.
See also https://youtrack.jetbrains.com/issue/SCL-22167/documentation-missing-for-methods-defined-in-Any

Expected behavior

I can see the documentation as for any other method

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

v1.29.0

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Feb 22, 2024

Thanks for reporting! Looks like the sources might not contain them. We could try getting documentation from https://github.com/scala/scala/blob/fcc67cd56c67851bf31019ec25ccb09d08b9561b/src/library-aux/scala/Any.scala#L150 somehow

@tgodzik tgodzik added the bug Something that is making a piece of functionality unusable label Feb 22, 2024
@robstoll
Copy link
Author

Yes, the sources.jar does not contain it. Jetbrains suggested to add it to the sources.jar. Would that be enough for metals to pick it up?

@tgodzik
Copy link
Contributor

tgodzik commented Feb 22, 2024

I think so. We do index everything there. We could possibly download it additionally ourselves if needed and is published

@bishabosha
Copy link
Contributor

in Scala 3 at least they should be available in the ctx.docCtx in the compiler

@robstoll
Copy link
Author

will be in sources.jar with scala/bug#12958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable
Projects
None yet
Development

No branches or pull requests

3 participants