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

Go to references of Widget property only search in same file with Flutter 3.7+ #4535

Closed
quyenvsp opened this issue May 10, 2023 · 2 comments
Closed
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@quyenvsp
Copy link

quyenvsp commented May 10, 2023

Describe the bug
On newer Flutter version 3.7+ Go to References of Widget property only find in same file.
Old version 3.3.2 working fine.
Go to References of function property work fine on both

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/noncheat/flutter_gotoreferences
  2. Using Flutter 3.3.2, right click required this.problemReferences, lib/test.dart:6 > Go to References
  3. Result will show main.dart and test.dart
  4. Using Flutter 3.10.0 repeat step 2
  5. Result only show test.dart

Expected behavior
Flutter 3.7+ when use Go to References of Widget property should find in all files.

Screenshots
Working - Go to References of Widget property in Flutter 3.3.2

Problem - Go to References of Widget property in Flutter 3.10.0

Working - Go to References of function property in Flutter 3.10.0

Please complete the following information:

  • Operating System and version: Windows 11
  • VS Code version: 1.78.1
  • Dart extension version: v3.62.0
  • Dart/Flutter SDK version: Dart 3.0.0 / Flutter 3.10.0
@DanTup DanTup added this to the v3.66.0 milestone May 11, 2023
@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server labels May 11, 2023
@DanTup
Copy link
Member

DanTup commented May 11, 2023

Thanks - I can repro this. I think it may be specific to using this. on the parameters. A smaller repro:

class AAA {
  final String? aaa;
  const AAA({this.aaa}); // Find reference on aaa here doesn't find the below
}

const a = AAA(aaa: ''); // Go-to-Definition on aaa here works

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue May 11, 2023
Fixes Dart-Code/Dart-Code#4535.

Change-Id: Id2cfc6abba756afc10d8b67bde86c0aae6ae5659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302786
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented May 11, 2023

This is fixed by dart-lang/sdk@2d43bc3.

The change is in the Dart analysis server so it'll show up in a future SDK release (rather than a Dart-Code release).

@DanTup DanTup closed this as completed May 11, 2023
@DanTup DanTup added the relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

2 participants