Comments (3)
I expect that we're going to move away from the notion of "library augmentations" and use part files (in one form or another) instead. If that happens, then there won't be any notion of a library augmentation
Ah yes, good points. In that case, let's close this one as there's potentially nothing to do for library augmentations and no doubt there will be further discussions about navigation around macros in dart-lang/sdk#54742 when the details are clearer. Thanks!
from dart-code.
I expect it to be shown under the annotation.
I think there are two different (but related) things here.
The "Go to Augmentation" CodeLens we have today is to jump from a declaration to its augmentation. It doesn't know anything about macros, it's just a way to jump between a declaration and an augmentation (or from an augmentation back to the augmented declaration).
We do not currently support this on libraries, but for consistency we probably should on the library declaration:
[ Go to Augmentation ]
library;
But this leaves two questions:
- What should we do if there is no
library
keyword? Should we use put the CodeLens at offset 0 of the doc? - Should we do this for all augmentations or only those implicitly imported by macros (eg. if a file already contains
import augment 'main_augmentation.dart';
is the CodeLens a little redundant?).
(@bwilkerson any opinions on this? I feel like for consistency we should probably always have one if a library has an augmentation and use offset 0 if there's no library keyword?).
I think the request here also touches on something different though, which is about navigating from around a macro application annotation. We don't currently have anything for this. While in many cases the Go to Augmentation CodeLens will do just this, it's also possible it'll take you to an augmentation produced by a completely different macro because it's only looking at resulting declarations and not at the macro application that happened to be adjacent to the CodeLens in the editor.
I think we should have something here (and maybe dart-lang/sdk#54742 is a good place for discussion of ideas about it).
from dart-code.
We do not currently support this on libraries, but for consistency we probably should on the library declaration
I expect that we're going to move away from the notion of "library augmentations" and use part files (in one form or another) instead. If that happens, then there won't be any notion of a library augmentation, so this feature won't make sense. And given that specification is likely to move in that direction, I don't think it makes sense for us to implement a feature that will likely soon need to be removed.
I don't know what the final specification for macros will look like, but if it doesn't include explicit part
directives for macro generated files, then I agree that we ought to look at ways to support navigating to the implicitly included files. But given that one of the proposals is to allow part files to include other parts (nesting arbitrarily deep), it isn't clear to me at this point what the navigation requirements will end up being.
from dart-code.
Related Issues (20)
- Debug breakpoints not triggering on iOS devices HOT 6
- Make it clearer which settings only apply to legacy analysis server protocol (additionalAnalyzerFileExtensions, analyzeAngularTemplates) HOT 1
- Make the display of getters/fields consistent
- Clean install on windows 11 using Visual Studio fails HOT 2
- Reload the Flutter sidebar from VS Code when the Flutter version changes HOT 3
- [Feature request] Make multi-line string literals foldable HOT 2
- When writing Flutter code in VSCode, there is no automatic indentation when breaking lines within the brackets {} HOT 5
- Quick fix for "Add missing switch cases" does not add all quick fixes HOT 1
- Add custom web server response headers when debugging a Flutter web app on VS code HOT 4
- Code keeps stoping at Disabled Breakpoints HOT 11
- Remove --ios-language for Flutter > 3.22 and update setting description
- Support syncing select debug session into the sidebar HOT 1
- Support openDevTools over sidebar API without a debug session ID HOT 3
- Closure completion suggestions should include types when always_specificy_types lint is enabled HOT 4
- "Open DevTools (in Browser?)" option doesn't work HOT 1
- No parameter hints when invoking a callable class HOT 1
- Workspace name/folder as macro for log
- Dart daemon left hanging when IDE was closed HOT 7
- "URI scheme 'c' is not supported" error using analyzer plugins with Dart 3.5 pre-release HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-code.