Skip to content
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

[Wildcard Variables] Analysis Server Implementation #55681

Open
23 of 45 tasks
Tracked by #55673
kallentu opened this issue May 9, 2024 · 2 comments
Open
23 of 45 tasks
Tracked by #55673

[Wildcard Variables] Analysis Server Implementation #55681

kallentu opened this issue May 9, 2024 · 2 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-wildcard-variables Implementation of the wildcard variables feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@kallentu
Copy link
Member

kallentu commented May 9, 2024

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.
  • Closing Labels
    • Test to make sure it doesn't crash.
      • Invoke something that doesn’t exist.
  • Code Completion
    • 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
      • @override works correctly with wildcards.
  • [Wildcard Variables] Add Code Folding tests #56009
    • Tests needed
      • Make sure that local functions named _ can still be folded
  • 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.
  • 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
  • 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
  • Navigation - legacy
    • Test on a wildcard variable and try to navigate, don’t crash.
  • Navigation - LSP Go to Definition
    • Test needed - no crashes.
      • super._ and this._ works as intended
  • Navigation - LSP Go to Type Definition
    • Test needed - no crashes.
      • Should do nothing.
  • Navigation - Go to Super
    • Test needed - no crashes.
      • _ methods don’t crash, should go to the correct destination.
  • Occurrences - legacy
    • Tests needed - no crashes
      • Make sure field _ works with their references
      • Clicking on field & clicking on their references
  • Occurrences - LSP Document Highlights
    • Tests needed - no crashes
      • Make sure field _ works with their references
      • Clicking on field & clicking on their references
  • 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.
  • 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.
      • Parameters named _ show up correctly.
      • Parameter still has a type.
  • 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:

  1. Do we need anything new?
  2. How many previous ones broke or need changing?

Potentially make an issue for each one.

@kallentu kallentu added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label May 9, 2024
@srawlins srawlins added type-enhancement A request for a change that isn't a bug P2 A bug or feature request we're likely to work on labels May 10, 2024
@pq pq added the feature-wildcard-variables Implementation of the wildcard variables feature label May 15, 2024
copybara-service bot pushed a commit that referenced this issue Jun 4, 2024
…riptive text.

Based on discussions for the analysis server implementation of the
wildcards feature (#55681).

Bug: #55681
Change-Id: I8a161ead687ffb71cf18fb573323fbb7c36bf0a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
copybara-service bot pushed a commit that referenced this issue Jul 16, 2024
See: #55681


Change-Id: I321bbcb9c1b45d10977aa860b0585c1d39632ea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
@pq
Copy link
Member

pq commented Jul 17, 2024

Closing Labels
Test to make sure it doesn't crash.
Invoke something that doesn’t exist.

@bwilkerson (or anyone), thoughts on what we're hoping to test here?

@bwilkerson
Copy link
Member

No, I can't think of anything. As far as I can remember, we only create a closing label for invocations of constructors, and constructor invocations aren't impacted by this language feature.

copybara-service bot pushed a commit that referenced this issue Jul 17, 2024
See: #55681

Change-Id: I80d37209fb69bfcacdec3bec943d75019e17966d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-wildcard-variables Implementation of the wildcard variables feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants