-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Use an ARM based Mac.
bdeb at ~
14:09:09 ❯ sysctl -a | grep machdep.cpu
machdep.cpu.cores_per_package: 8
machdep.cpu.core_count: 8
machdep.cpu.logical_per_package: 8
machdep.cpu.thread_count: 8
machdep.cpu.brand_string: Apple M3
- Ensure you are using the x86_64 executable of
pwshwhich will run through Rosetta translation.
bdeb at ~ took 1m8s
11:37:23 ❯ whereis pwsh-preview
pwsh-preview: /usr/local/bin/pwsh-preview /usr/local/share/man/man1/pwsh-preview.1.gz
bdeb at ~
11:38:58 ❯ file /usr/local/bin/pwsh-preview
/usr/local/bin/pwsh-preview: Mach-O 64-bit executable x86_64
bdeb at ~
11:39:03 ❯ pwsh-preview
PowerShell 7.6.0-preview.2
- As it is related to Misleading error message when parsing
Configurationkeyword on ARM processor #18781, prove that LanguageMode is FullLanguage:
PS /Users/bdeb> $ExecutionContext.SessionState.LanguageMode
FullLanguage
- Parse a script containing the Configuration keyword.
PS /Users/bdeb> $errors = $null
PS /Users/bdeb> [System.Management.Automation.PSParser]::Tokenize("Configuration MyConfig {}",[ref]$errors)
- View the resulting errors.
PS /Users/bdeb> $errors
Token Message
----- -------
System.Management.Automation.PSToken Configuration keyword is not supported on ARM64 processors.
System.Management.Automation.PSToken Unexpected token '}' in expression or statement.
Expected behavior
As hinted by SteveL-MSFT at #18781 (comment)
Note that on osx, if you still currently need this capability, you can use the x64 built version of PS7 and through osx emulation have it work.
I was hoping the parsing of DSC Configuration blocks would work on my ARM mac, so development of DSC configurations can be done here with proper tooling and feedback.
Wondering if anyone has this working right now, and knows if I might be overlooking or missing something?
Actual behavior
Currently, the Configuration block does not get parsed, and the error Configuration keyword is not supported on ARM64 processors. is thrown.
Error details
See Steps to Reproduce.
Environment data
PS /Users/bdeb> $PSVersionTable
Name Value
---- -----
PSVersion 7.6.0-preview.2
PSEdition Core
GitCommitId 7.6.0-preview.2
OS Darwin 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:00:33 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8122
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
Metadata
Metadata
Assignees
Labels
No labels
