Skip to content

[Null-aware elements] Analysis Server Implementation #56989

@chloestefantsova

Description

@chloestefantsova

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.
      • Verify that the invocations inside of the null-aware collection elements are handled.
      • Done: https://dart-review.googlesource.com/c/sdk/+/393321
      • Updated test cases in files:
        • pkg/analysis_server/test/lsp/call_hierarchy_test.dart
        • pkg/analysis_server/test/src/computer/call_hierarchy_computer_test.dart
  • Closing Labels
  • Code Completion
    • Tests needed.
      • Add different use cases for the different locations of the null-aware elements.
    • Implementation needed
      • We almost certainly will need to add an implementation for the new node.
    • Done: https://dart-review.googlesource.com/c/sdk/+/392902
    • Updated implementation in files:
      • pkg/analysis_server/lib/src/services/completion/dart/in_scope_completion_pass.dart
    • Updated test cases in files:
      • pkg/analysis_server/test/services/completion/dart/location/null_aware_element_test.dart
      • pkg/analysis_server/test/services/completion/dart/location/test_all.dart (to include null_aware_element_test.dart)
  • Code Folding
    • Tests needed.
      • No crashes.
      • Check that closures inside the expressions, inside of the null-aware elements, are properly folded. It has to be multiline.
      • Done: https://dart-review.googlesource.com/c/sdk/+/396860
      • Updated test cases in files:
        • pkg/analysis_server/test/src/computer/folding_computer_test.dart
  • Document Symbols
    • Needs clarification.
  • Document Colors
  • Hovers
  • Implemented/Override Markers
    • Not affected.
  • Inlay Hints
    • Tests needed.
  • Navigation - legacy
  • Navigation - LSP Go to Definition
    • Test needed.
      • No crashes.
      • Add an identifier inside of a null-aware element and check that the navigation works.
      • Done: https://dart-review.googlesource.com/c/sdk/+/399080
      • Updated test cases in files:
        • pkg/analysis_server/test/lsp/definition_test.dart
        • pkg/analysis_server/test/lsp/super_test.dart
  • Navigation - LSP Go to Type Definition
  • Navigation - Go to Super
  • Occurrences - legacy
    • Tests needed.
      • No crashes.
      • Make sure that something inside of the null-aware element is highlighted when needed. Test both ways: when the clicked word is outside, and when it’s inside.
      • Done: https://dart-review.googlesource.com/c/sdk/+/411243
      • Updated test cases in files:
        • pkg/analysis_server/test/integration/analysis/occurrences_test.dart
  • Occurrences - LSP Document Highlights
    • Tests needed.
      • No crashes.
      • Make sure that something inside of the null-aware element is highlighted when needed. Test both ways: when the clicked word is outside, and when it’s inside.
  • Organize Imports
    • Not affected.
  • Outline
    • Not affected.
  • Flutter Outline
    • Tests needed.
  • Refactorings
    • Refactorings - legacy
    • Refactorings - rename refactoring
    • Refactorings - self describing
    • Quick Assists
    • Quick Fixes
    • Evaluate how likely it is for a refactoring to be affected, and write the corresponding tests,
    • Add reasonable fixes for the existing diagnostics.
    • Added tests:
  • Search
    • Search - Find References
    • Search - Implementations - LSP
    • Search - Member Declarations
    • Search - Member References
    • Search - Top-level Declarations
    • Tests needed.
      • Test searching for local variables.
  • Selection Range
    • Tests needed.
      • Test that the boundaries of the null-aware elements can be crossed during expansion.
  • Syntax Highlighting
    • Semantic Highlights
    • LSP Semantic Tokens
    • Not affected.
  • Signature Help
    • Not affected.
  • Snippets
    • Not affected.
  • Sort Members
    • Not affected.
  • Type Hierarchy - legacy
    • Not affected.
  • Type Hierarchy - LSP
    • Not affected.
  • Workspace Symbols
    • Tests needed.
      • Add tests for local variables.

Metadata

Metadata

Labels

P2A 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.devexp-serverIssues related to some aspect of the analysis serverfeature-null-aware-elementsImplementation of the Null-aware elements featuretype-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions