Open kubukoz opened 9 months ago
Thanks for reporting! The list is generated manually, we need to add also add the additional class or figure out a way to generate the list automatically. Maybe we could read the classfiles and figure out which ones come from the current source file?
For the current case we would most likely need to add a library to be able to read classfiles though :/
For the current case we would most likely need to add a library to be able to read classfiles though :/
it could start with a heuristic: s"strings $classFile".!!.contains(fileName)
😅
Another option would be to read zinc analysis files, which apparently contain that infor. I am however unsure how to do it without adding a dependency on zinc itself.
Describe the bug
Synthetic classes generated by certain Scala versions (I checked 2.13, 2.12 probably also does this, 3.x doesn't) don't show up in the selector of classes to decode with javap.
To reproduce:
1.
Super
,Demo
andA$
are shownExpected behavior
Demo$A$$anonfun$$lessinit$greater$1
is also shown.Here's one of its methods (the one that returns the 42) - I got this by running
javap -v
manually in the.scala-build
directory of my project.I realize this is possibly a niche usecase, and it's probably going to add some noise in real-world scenarios, so perhaps these can be shown last on the list. It'd be good to try enabling this on a codebase with a lot of closures in use and see if it is indeed noisy.
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
1.2.0
Extra context or search terms
No response