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

Fix nested type property decorator completions #11972

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Fix nested type property decorator completions #11972

merged 1 commit into from
Sep 28, 2023

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Sep 28, 2023

Resolves #11970

The LS is currently looking at the type of the top-level statement in which a cursor is located when proposing decorator completions. This means that for a scenario like the following:

type obj = {
  @|
  prop: int
}

the LS will propose completions for decorators that can be used on objects (the type of the full type obj = {...} statement) rather than decorators that can be used on integers (the type of the decorator's target). Consequently, the LS is proposing completions that will raise an error diagnostic (like @sealed() or @discriminator()) and not proposing completions that would be valid (like @minValue()).

Microsoft Reviewers: Open in CodeFlow

@jeskew jeskew requested a review from a team September 28, 2023 15:02
@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2023

Test this change out locally with the following install scripts (Action run 6341807474)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 6341807474
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 6341807474"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 6341807474
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 6341807474"

@github-actions
Copy link
Contributor

Test Results

     132 files   -      11       132 suites   - 11   3h 15m 43s ⏱️ - 25m 22s
10 658 tests +       1  10 658 ✔️ +       1  0 💤 ±0  0 ±0 
51 499 runs   - 2 834  51 499 ✔️  - 2 834  0 💤 ±0  0 ±0 

Results for commit 8961bad. ± Comparison against base commit 6f58518.

Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jeskew jeskew merged commit 65a5dee into main Sep 28, 2023
47 checks passed
@jeskew jeskew deleted the jeskew/11970 branch September 28, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Defined Types - missing decorators
2 participants