-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Misleading error message when parsing Configuration keyword on ARM processor #18781
Copy link
Copy link
Closed
Closed
Copy link
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Type
Fields
Give feedbackNo fields configured for issues without a type.
Prerequisites
Steps to reproduce
When I work on PowerShell DSC files on an ARM-based Mac, the PowerShell extension for VS Code claims that I'm in constrained language mode and warns that I can't use the
Configurationkeyword.To reproduce:
Configurationkeyword.Expected behavior
The
Configurationkeyword should be supported, or the error message should accurately state why it's not supported.Actual behavior
The error message claims constrainedLanguage mode is enabled, which isn't true.
I believe this is caused by this block of code, which checks that either:
PowerShell/src/System.Management.Automation/engine/parser/Parser.cs
Lines 2987 to 2995 in c3a080c
It uses the same error message ("Configuration keyword is not allowed in constrainedLanguage mode.") even if the real issue is that I'm using an ARM processor.
Error details
No response
Environment data
Visuals
From the Visual Studio Code PowerShell extension:
