Azure / Azure/bicep

VS Code extension does not handle module case (in)sensitivity correctly

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

Description

**Bicep version**
0.18.4

**Describe the bug**
Noticed following issue in the VS Code Extension running on Windows after renaming the module file from `resourcegroup.bicep` to `resourceGroup.bicep`:
image

One would expect to see red lines to indicate the filename being incorrect. However as Windows is case insensitive, it shows no error and deployments still work. Running on Linux (typically ubuntu-latest as build agent), you will get an error that says it can't find the file (due to case sensitivity)

```
Error BCP091: An error occurred reading file. Could not find file '/home/vsts/work/1/s/modules/resources/resourcegroup.bicep'.
```

**To Reproduce**
Steps to reproduce the behavior:

- Create a bicep deployment with a module
- Rename the file (on Windows) by changing capitalization
- Try to deploy on Windows
- Try to deploy on Linux

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the module rename scenario in the VS Code extension on Windows and Linux, using the referenced module file and deployment steps. Trace how the extension resolves module paths and reports diagnostics; done means a capitalization mismatch is identified consistently before deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.