Add notice on breaking change in v0.12.40 release notes? #8972
-
Bicep version Bicep CLI version 0.12.40 (41892bd) #8876 introduced a breaking change for cases where you have a parameter named the same as a type (e.g. This caused some existing templates to break. Not a big deal, and I know that there is not a strict breaking change policy (yet), but it would be good if this was more clearly highlighted in the release notes. To Reproduce This fails: main.bicep: param string string = 'hello'
output message string = string bicep build main.bicep
main.bicep(1,14) : Error BCP287: 'string' refers to a value but is being used as a type here.
main.bicep(3,12) : Error BCP287: 'string' refers to a value but is being used as a type here.
main.bicep(3,21) : Error BCP079: This expression is referencing its own declaration, which is not allowed. This needs to be changed to: param myString string = 'hello'
output message string = myString to transpile. FYI: I can't get this to work (as I would assume from the PR that introduced it) param string sys.string = 'hello'
output message sys.string = string bicep build main.bicep
main.bicep(1,7) : Warning no-unused-params: Parameter "string" is declared but never used. [https://aka.ms/bicep/linter/no-unused-params]
main.bicep(3,16) : Error BCP306: The name "sys" refers to a namespace, not to a type.
main.bicep(3,19) : Error BCP018: Expected the "=" character at this location.
main.bicep(3,35) : Error BCP009: Expected a literal value, an array, an object, a parenthesized expression, or a function call at this location. Additional context Could you update the release notes to include issue description from #8876 to highlight that there is a breaking change? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, we should have done a better job informing of this breaking change. We made an (incorrect!) assumption that nobody would have parameters named this way and treated this breaking change too casually. I will update the release notes and we will do a better job of this in the future! I'm going to move this to a discussion for now. |
Beta Was this translation helpful? Give feedback.
Yes, we should have done a better job informing of this breaking change. We made an (incorrect!) assumption that nobody would have parameters named this way and treated this breaking change too casually. I will update the release notes and we will do a better job of this in the future!
I'm going to move this to a discussion for now.