Skip to content

"part of" declarations do not support file links #3970

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

Closed
gskinner opened this issue May 18, 2022 · 2 comments
Closed

"part of" declarations do not support file links #3970

gskinner opened this issue May 18, 2022 · 2 comments
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
Milestone

Comments

@gskinner
Copy link

Is your feature request related to a problem? Please describe.
Most declarations that reference other files (ex. import, part) support command-clicking the path to jump to that file. This currently does not work for part of. This is even weirder since it's supported in part, so you can nav to the part, but not back from it.

Describe the solution you'd like
Cmd-clicking the path (ex. "file_name.dart" below) in a part of statement should jump to that file.

part of 'file_name.dart'

@DanTup
Copy link
Member

DanTup commented May 23, 2022

Working on a fix at https://dart-review.googlesource.com/c/sdk/+/245701/.

Btw, I don't know the details but on this page it recommends:

Note: You may have heard of the part directive, which allows you to split a library into multiple Dart files. We recommend that you avoid using part and create mini libraries instead.

It's not a reason not to report/fix issues with part, but I thought it was worth noting. Thanks!

@DanTup DanTup added this to the v3.42.0 milestone May 23, 2022
@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 is bug and removed is enhancement labels May 23, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue May 24, 2022
Fixes Dart-Code/Dart-Code#3970.

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

DanTup commented May 24, 2022

Fixed in dart-lang/sdk@2591ed8. Since the change is in the analysis server, it will show up in an SDK release (rather than a VS Code extension release).

@DanTup DanTup closed this as completed May 24, 2022
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
Projects
None yet
Development

No branches or pull requests

2 participants