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)
- Facilitate Exception handling by exposing all Exception that could be thrown or bubble up when calling a fucntion HOT 1
- DevTools is blank when several tools are open HOT 4
- Connection to server got closed. Server will not be restarted. HOT 10
- Switch to parsing the new Flutter version file `bin/cache/flutter.version.json` instead of the legacy one `version` and remove workaround
- In a monorepo, when you select the debug session and select "Dart & Flutter...", all projects are shown, but all with the root folder name instead of the project name. HOT 2
- Property flavors is not allowed.yaml-schema: pubspec.yaml HOT 5
- Dart language server crashes on startup HOT 3
- "Performing refactor..." toast for "Move class to file"
- Issue on website (Modifying Files Outside Workspace) HOT 1
- Evaluation not working HOT 8
- Bug report: Auto complete doesn't add import to show clause HOT 4
- Add an option to always show libraries against completions even if they're already in-scope and won't add an import HOT 10
- Feature request: import show hints HOT 1
- Feature request: automatic imports HOT 1
- Prefixed identifiers shouldn't be hidden from completion by the same identifier with no/different prefixes HOT 7
- Issue on website (Launch Configuration) HOT 1
- Generic error connecting to the service protocol HOT 11
- Automated Detection of Unused Assets, Files, and Dependencies in Flutter Projects HOT 1
- `@annotation super.` appears parsed differently than `@annotation this.` HOT 2
- Different (missing) debug console logs HOT 1
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.