-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverfeature-wildcard-variablesImplementation of the wildcard variables featureImplementation of the wildcard variables featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
This issue tracks all the analysis server work items for the wildcard variables feature. Referenced from: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/process/new_language_feature.md
- Call Hierarchy
- Tests needed.
- No crashes
- Maybe should show no callers.
- One for each direction.
- Local function called
_should show all the things that call that function. - Might need to have a check that nobody can call it.
- Tests needed.
- Closing Labels
- Test to make sure it doesn't crash.
- Invoke something that doesn’t exist.
- Test to make sure it doesn't crash.
- [Wildcard Variables] Code Completion Support #56361
- Tests needed, work needed
- Don’t want to suggest wildcards that can’t be referenced.
- Test the situations for binding _ to make sure it still works. (Top level declarations, fields, etc)
- Test import prefix named _ -> still nonbinding but can access extensions
@overrideworks correctly with wildcards.
- Tests needed, work needed
- [Wildcard Variables] Add Code Folding tests #56009
- Tests needed
- Make sure that local functions named _ can still be folded
- Tests needed
- Document Symbols a9ec266
- Tests needed, work needed
- Do we want local functions with a name of _ to show up in the outline view?
- Yes. It’s there whether we want to call it or not.
- Then test that they are behaving the way we want them to.
- Do we want to see the nested local functions too?
- If we include them, make sure to test that two can show up at the same time, as they would have the same name.
- Do we want local functions with a name of _ to show up in the outline view?
- Tests needed, work needed
- Document Colors
- Flutter Outline
- Hovers
- Work needed, tests needed
- Make decision on what we want to show up
- Do we want a special message that it’s a wildcard variable?
- Test that it is as expected
- Make decision on what we want to show up
- Work needed, tests needed
- Implemented Markers
- Test that it works for _ named methods and classes.
- Inlay Hints
- Tests needed, work needed
- Nothing is broken
- UX decision - what do we want to show for inlay hints?
- Parameter names
var _ = 1
- Tests needed, work needed
- Navigation - legacy
- Test on a wildcard variable and try to navigate, don’t crash.
- Navigation - LSP Go to Definition
- Test needed - no crashes.
super._andthis._works as intended
- Test needed - no crashes.
- Navigation - LSP Go to Type Definition
- Test needed - no crashes.
- Should do nothing.
- Test needed - no crashes.
- Navigation - Go to Super
- Test needed - no crashes.
_methods don’t crash, should go to the correct destination.
- Test needed - no crashes.
- Occurrences - legacy
- Tests needed - no crashes
- Make sure field _ works with their references
- Clicking on field & clicking on their references
- Tests needed - no crashes
- Occurrences - LSP Document Highlights
- Tests needed - no crashes
- Make sure field _ works with their references
- Clicking on field & clicking on their references
- Tests needed - no crashes
- Organize Imports
- Tests needed - no crashes.
- Outline
- See above (Outline - Document Symbols)
- Overrides Markers
- Search - Find References
- Tests needed
- Make sure field/method named
_ - Local var with
_has error, but still can find it? - Make sure it's working correctly when we opt out too.
- Pre/post wildcard behaviour.
- Make sure field/method named
- Tests needed
- Search - Implementations - LSP
- Search - Member Declarations
- Search - Member References
- Search - Top-level Declarations
- Selection Range
- Syntax Highlighting
- Semantic Highlights
- LSP Semantic Tokens
- Signature Help
- Tests needed (10cbc8f)
- Parameters named
_show up correctly. - Parameter still has a type.
- Parameters named
- Tests needed (10cbc8f)
- Snippets
- Sort Members
- Type Hierarchy - legacy
- Type Hierarchy - LSP
- Workspace Symbols
Larger Tasks
These need to be audited one at a time and asked the following:
- Do we need anything new?
- How many previous ones broke or need changing?
Potentially make an issue for each one.
- Quick Assists
- Quick Fixes
- [wildcards] Consider quick fix: convert
UNUSED_ELEMENTto wildcard #56581 - [wildcards] Quick fix for dead late wildcard variable initializers #56221
- [wildcards] Quick fix: convert
UNUSED_LOCAL_VARIABLEto wildcard #55965 - [wildcards] Consider quick fix: convert
UNUSED_CATCH_CLAUSEto wildcard #55980 - [wildcards] Consider quick fix: convert
UNUSED_CATCH_STACKto wildcard #56582 - [wildcards] Consider reporting
UNUSED_CATCH_STACKfor stack wildcard params #55738
- [wildcards] Consider quick fix: convert
- [wildcards] Semantic Highlighting - consider styling wildcards #56567
- Consider highlighting wildcards specially (see discussion)
- Refactorings - legacy
- Refactorings - self describing
- Rename refactoring
- Make sure the rename works correctly (What is correct?)
- If someone has parameter named
_and they try to reference it- Do we want to offer refactoring to rename this
_?- Probably yes.
- Still resolve the non-binding variable, but give error
- Do we want to offer refactoring to rename this
- If we have a field named _, ref will be bound the the field
- Maybe quick fix that says rebind it to local?
- Or two non-binding parameters
- Ambiguous, which one?
srawlins
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverfeature-wildcard-variablesImplementation of the wildcard variables featureImplementation of the wildcard variables featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug