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
40 of 46 tasks
Tracked by #55673
kallentu opened this issue May 9, 2024 · 2 comments
Open
40 of 46 tasks
Tracked by #55673

[Wildcard Variables] Analysis Server Implementation #55681

kallentu opened this issue May 9, 2024 · 2 comments
Assignees
Labels
analyzer-server 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.
  • [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
      • @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 (10cbc8f)
      • 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>
copybara-service bot pushed a commit that referenced this issue Jul 31, 2024
See: #55681

Change-Id: Ibbb2771cea0311a6bf2145f663efff07f2f97d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 19, 2024
See: #55681

Change-Id: Iedffc92f6650fc6bd57672bad94c83acd54d26a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 20, 2024
See: #55681

Change-Id: I733947154352f887896e48b96ead34d8e8159fb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381307
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 23, 2024
See: #55681

Change-Id: Ia1f8cc08d7a79fe66fce9ac108543cb2a6aebd34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381943
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 23, 2024
See: #55681

Change-Id: Ib264ddfa2937e6c7fe1a0189a79255b137426bba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 23, 2024
See: #55681

Change-Id: I58630feb6e8b35b00d90d20c305a2f0ca9b37e4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382042
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 24, 2024
See: #55681

Change-Id: I29afe39dd293e2e9da67791ad92f3d6d8356493e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381807
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 24, 2024
See: #55681

Change-Id: I3297ede2b7dea1247ab8f2b6e8c972acac53c4c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381885
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
copybara-service bot pushed a commit that referenced this issue Aug 26, 2024
See: #55681

Change-Id: I5426ef22d56f6c2ab92a2028969cebd867a676ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
@pq pq self-assigned this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server 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