-
Notifications
You must be signed in to change notification settings - Fork 338
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
Autocomplete misses some classes #6630
Comments
Thanks, for the report, could you add information about what Scala version you are using? |
Yes sorry added the scala version (3.4.2) Also in the logs sometime I get this exception, not sure if it is related:
|
I can't seem to reproduce, but might be this connected to the issue where the compiler would not get all the symbols from symbol search @kasiaMarek ? @kostaskougios are you able to add a small reproduction. Any small data might be useful. Are both of those objects, classes etc. Are they in the same package. Best would be a small repro in a repository or text snippets here. |
@tgodzik , I tried and couldn't reproduce exactly but something similar happens to this repo of mine ( that I've created in the past for a different metals bug) https://github.com/kostaskougios/metals-bugs If you clone it then open class TroopsClientState and have a look. Now open "trymain" and uncomment the "val x=.." code: @main def trymain() = Now remove the parenthesis and try autocomplete for "val x = TCS". You should now see both classes in the autocomplete. Maybe a different issue but worth having a look. Also this repo will trigger the exception during (probably) indexing:
|
One thing I notice is that if I ctrl-space a non-imported class of my project, it is not recommended. But if I save the file and Cmd-. then the classes or my project are recommended to be imported. |
No I don't think so. EDIT: Side note: Here type not module should be suggested (
It seems the scopes are incorrectly detected and indexer produces the same symbol twice.
Heh, that's a funny one. It does seem to be a different thing. |
@kostaskougios would you be able to check if the behaviour improved with Scala 3.5.0? |
@tgodzik yes it works now, TCS(Ctrl-Space) does suggest TroopsClientState and TroopsClientNextState |
Thanks for confirming! |
Describe the bug
I got a class TroopsClientState and TroopsClientNextState. If I search for a class and type TCS I can see both, but in the editor when I do i.e. def tcs:TCS(Ctrl-Space) I only get TroopsClientNextState for some reason.
I am using scala 3.4.2 with sbt.
Expected behavior
TCS(Ctrl-Space) should show both classes
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.38.0
Extra context or search terms
No response
The text was updated successfully, but these errors were encountered: