You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go to Implementations on a getter gives random-looking results #4531
Describe the bug
Right click and show implementations on a specific getter, and the in-line dialog shows obviously implausible suggestions. The feature works most of the time so I'm not sure what set of conditions is causing this. IntelliJ's plugin seems to give good results here, so to start with, filing with the VSCode plugin.
Thanks for the detailed steps, I can reproduce this - taking a look.
(btw, I'm curious what "Set up directory as a Dart project" meant in your steps though - you shouldn't need to do anything special for VS Code to load the Dart extension?)
1683650484067:Info:Found item at 1111::11 of /Users/danny/Dev/Google/dartdoc/lib/src/element_type.dart
1683650484067:Info:Changed to member at 1759::12 of /Users/danny/Dev/Google/dartdoc/lib/src/model/model_object_builder.dart
Looks like we get confused by implementations coming from mixins in other files. We find abstract class ElementType in element_type.dart and then see if it has an implementation of modelBuilder and find it from the ModelBuilder mixin, but we use the original filename with the new offset/length.
Thanks for the detailed steps, I can reproduce this - taking a look.
(btw, I'm curious what "Set up directory as a Dart project" meant in your steps though - you shouldn't need to do anything special for VS Code to load the Dart extension?)
That was intended to be handwaving around open the directory in a workspace and press all the right buttons to make Dart work. Looks like it was successful enough :-)
Activity
DanTup commentedon May 9, 2023
😬
Thanks for the detailed steps, I can reproduce this - taking a look.
(btw, I'm curious what "Set up directory as a Dart project" meant in your steps though - you shouldn't need to do anything special for VS Code to load the Dart extension?)
DanTup commentedon May 9, 2023
Looks like we get confused by implementations coming from
mixins in other files. We findabstract class ElementTypeinelement_type.dartand then see if it has an implementation ofmodelBuilderand find it from theModelBuildermixin, but we use the original filename with the new offset/length.jcollins-g commentedon May 9, 2023
That was intended to be handwaving around open the directory in a workspace and press all the right buttons to make Dart work. Looks like it was successful enough :-)
DanTup commentedon May 9, 2023
Got it, thanks!
I've got a fix open at https://dart-review.googlesource.com/c/sdk/+/302400.
[analysis_server] Fix LSP implementations that are provided by mixins
DanTup commentedon May 10, 2023
Fix landed in dart-lang/sdk@334ce04.
(the fix is part of the SDK so will show up with an SDK update, not Dart-Code update)