Azure / Azure/bicep

VSCode code completion for provider declaration statement suggests invalid statement

Open
#12,815 0 comments 0 reactions 0 assignees View on GitHub
story: dynamic type loading
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.24.24

**Describe the bug**
Code completions for `provider` declaration statement is suggesting 'az@0.2.661' as a valid provider value, however, since the introduction of `az` provider dynamic loading, this is no longer valid. The valid value is `br/public:az@0.2.661'

![image](https://github.com/Azure/bicep/assets/9611108/1ace8417-a034-451a-b40b-f19599e7866d)

**To Reproduce**
Steps to reproduce the behavior:
1. Install the VS or VSCode extension for v0.24.24
1. Create a test directory to store your main.bicep and bicepconfig.json
1. Create a bicepconfig.json with the following contents
```json
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"dynamicTypeLoading": true
}
}
```
1. Create a new `main.bicep` file and type the following
```bicep
provider
```
1. You will get completions for provider values as shown below, the first entry is no longer valid and should yield `br/public:az@0.2.661`. The other entries are valid and can remain as is for now.
![image](https://github.com/Azure/bicep/assets/9611108/6962a2b8-6169-4455-a114-c321045d8616)

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Reproduce the completion in main.bicep using the bicepconfig.json from the report and the listed extensibility settings. Start from the VS or VSCode extension's provider completion behavior, then verify that the first suggestion uses br/public:az@0.2.661 while the other entries remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.