Azure / Azure/bicep

BICEP BCP079: This expression is referencing its own declaration, which is not allowed.

Open
#5,313 5 comments 0 reactions 0 assignees View on GitHub
error-message good first issue
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.4.1008 (223b8d227a)

**Describe the bug**
When decompiling an ARM template, I see a number of warnings in output.

BICEP BCP079: This expression is referencing its own declaration, which is not allowed.

This warning is confusing and not sure how to act on it other than deleting the description.

I would expect that Bicep understands the @description metadata tag or has some way of creating a custom attribute for this.

**To Reproduce**
Each line has a description.

```arm
"parameters": {
"workspaceName": {
"type": "string",
"metadata": {
"description": "Specifies the name of the Azure Machine Learning service workspace."
}
},
```

```bicep
@description('Specifies the name of the Azure Machine Learning service workspace.')
param workspaceName string
```

**Additional context**
#1665 may relate.

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Reproduce decompilation with the ARM parameters metadata.description example, compare it with the shown Bicep @description output, and review related issue #1665 and the existing discussion. Done means the description no longer produces a confusing BCP079 warning, or the expected handling is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.