Repository navigation
Conversation
On Apple Silicon Macs the language server currently runs as an x86_64 process under Rosetta, because only an osx-x64 self-contained build is published for macOS. - build.ps1: additionally publish the server for osx-arm64 into bin/netcore/darwin-arm64 - toolsLangServerClient.ts: start the darwin-arm64 binary when VS Code itself runs as an arm64 process; x64 VS Code (incl. under Rosetta) keeps using the existing darwin build No C# changes are needed: the server projects are AnyCPU and the AL compiler assemblies loaded from the Microsoft AL extension are IL-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The build and runtime-selection changes are consistent, scoped, and preserve existing platform behavior.
0 open findings
What changed in this PR
Adds native Apple Silicon language-server support while preserving existing x64 behavior.
Changes:
- Publishes an
osx-arm64self-contained server build. - Selects arm64 binaries when VS Code runs natively on Apple Silicon.
| File | Description |
|---|---|
build.ps1 |
Builds and clears the new arm64 output directory. |
vscode-extension/src/langserver/toolsLangServerClient.ts |
Selects the correct macOS binary based on process architecture. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Apple Silicon Macs,
AZALDevToolsServer.NetCorecurrently runs as an x86_64 process under Rosetta, becausebuild.ps1only publishes a self-containedosx-x64build for macOS.The same was true previously for Microsoft's AL binaries, but as of 18.x version of AL extension, they switched to automatic runtime acquiring and building "on-the-fly": microsoft/AL#8251.
It is important because Apple is starting to phase out Intel support via Rosetta 2: Mac OS v28 will not support it at all in a year; Mac OS v27 uninstalls Rosetta with an option to install it back.
This PR adds an
osx-arm64build and makes the extension pick it when VS Code runs natively on arm64.Changes
build.ps1: additionally publish the server with-r osx-arm64intobin/netcore/darwin-arm64(and clear that folder together with the others).toolsLangServerClient.ts: ondarwinwithos.arch() === "arm64", startbin/netcore/darwin-arm64/AZALDevToolsServer.NetCore; otherwise the path is unchanged. An x64 VS Code build (including one running under Rosetta) keeps using the existingdarwinbinaries.No C# changes are needed: the server projects are plain
net10.0(AnyCPU), and the AL compiler assemblies loaded from the Microsoft AL extension (Microsoft.Dynamics.Nav.CodeAnalysis*.dll,…EditorServices.Protocol.dll) are IL-only.Testing
On an Apple Silicon Mac (macOS 15, .NET SDK 10.0.401), built from
master(18.81.0) against AL extension 18.0.2732683:dotnet publish … -r osx-arm64 --self-containedbuilds with no new warnings; output has the same file set as theosx-x64build, with arm64 Mach-O binaries.al/documentsymbolsrequest over stdio: correct symbol tree returned,vmmapreportsCode Type: ARM64.bin/netcore/darwinof the installed 18.81.0 extension with the arm64 build as a local test.build.ps1parses cleanly in PowerShell 7;npm run compilepasses.Rough indication only (single run, includes process start): first
al/documentsymbolsround-trip took 2.66 s with the x64 build under Rosetta vs 0.52 s with the arm64 build.Notes
vsce package --target darwin-arm64, etc.), but that changes the release process, so I kept this PR minimal.CHANGELOG.mdsince versioned entries look maintainer-managed; happy to add one.linux-arm64could be added the same way if wanted.🤖 Generated with Claude Code