Azure / Azure/bicep

Bad Autocompletion on resource types after `.` or `/`

Open
#5,937 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
v0.4.1124

**Describe the bug**
When typing a resource name in auto completion, auto complete seems to forget everything you've typed so far if you get to a `.` or a `/`, which leads to some surprising completion results.

**To Reproduce**
![image](https://user-images.githubusercontent.com/289860/153509451-2b66bfa5-63e5-47d2-8768-abcc240ca48b.png)

Now type `/w`. I'd now expect `Microsoft.OperationalInsights/workspace` to be the top result. Instead you end up with completely unrelated results. It seems as if auto completion is ignoring everything before the `/` and just searching on `w`

![image](https://user-images.githubusercontent.com/289860/153509577-6c600c2e-0f4a-4cd1-b5f8-2c3c0b9c2588.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the autocomplete steps in the issue using Bicep v0.4.1124, including completion after a resource type's `.` and `/`. Trace which autocomplete search input is used for the typed resource name, then verify that the full prefix affects the results and places `Microsoft.OperationalInsights/workspace` first for `/w`.

Written by the indexing model from the issue text.

Assessment

Domain
cloud, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.