Azure / Azure/bicep

Symbolic name codegen - optimize indexed access with integer literal

Open
#4,254 0 comments 0 reactions 0 assignees View on GitHub
tech debt
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

From discussion on https://github.com/Azure/bicep/pull/4138.

Rather than generating `[format('symbol[{0}]', 0)]` when building a fixed-index reference to an item in a symbolic name resource loop, we could instead just generate `symbol[0]`.

Contributor guide

Open the contributing guide

Research direction

Start in the symbolic-name resource loop code-generation path discussed in issue #4254 and compare the generated indexed reference for an integer literal with the current format-based form. Done means fixed-index references emit the direct symbol[0]-style access rather than format('symbol[{0}]', 0); no specific file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.