Repository navigation
Parser throws error on [ #1024
Description
Activity
- addedIssue-BugSomething isn't workingSomething isn't working
on Aug 1, 2025 Per ARM rules, you need to "escape" the opening square bracket with a square bracket
[[5.0.6.0]https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-expressions#escape-charactersMaybe something we could do is check for this specific case and give a specific error message to escape it.
- addedResolution-By DesignThe reported behavior is by designThe reported behavior is by designIssue-EnhancementThe issue is a feature or ideaThe issue is a feature or ideaand removedIssue-BugSomething isn't workingSomething isn't workingResolution-By DesignThe reported behavior is by designThe reported behavior is by design
on Aug 4, 2025 ThomasNieto commented
on Aug 4, 2025 CollaboratorAuthorMore actionsSteve Lee (@SteveL-MSFT) adding that extra
[didn't fix it.dsc config get -f C:\temp\module.dsc.config.yaml 2025-08-04T18:58:33.316135Z ERROR Parser: Unable to parse statement root: [5.0,6.0) dsc config get -f C:\temp\module.dsc.config.yaml 2025-08-04T18:59:06.891977Z ERROR Parser: Unable to parse statement root: [5.0,6.0]Thomas Nieto (@ThomasNieto) I'll take a look
Thomas Nieto (@ThomasNieto) can you give me a repro using the
Echoresource?
ThomasNieto commented
on Aug 5, 2025 CollaboratorAuthorMore actionsSteve Lee (@SteveL-MSFT) it works using
Echobut not a PS Adapter resource.@SteveL-MSFT it works using
Echobut not a PS Adapter resource.Ok, in that case, I think the problem is that the string gets unescaped and passed to the adapter which then errors because the escape is missing. For now, you might be able to workaround it by double escaping:
[[[5.0,6.0]
Prerequisites
Summary
If the property value contains a
[the parser thinks its the beginning of a function.Steps to reproduce
Expected behavior
Parses string literalActual behavior
ERROR Parser: Unable to parse statement root: [5.0,6.0)Error details
ERROR Parser: Unable to parse statement root: [5.0,6.0)Environment data
Version
3.2-preview3
Visuals
No response