Fix Avalonia.DesignerSupport build on win-arm64#20994
Open
drasticactions wants to merge 2 commits intomasterfrom
Open
Fix Avalonia.DesignerSupport build on win-arm64#20994drasticactions wants to merge 2 commits intomasterfrom
drasticactions wants to merge 2 commits intomasterfrom
Conversation
|
You can test this PR using the following package version. |
MrJul
reviewed
Mar 26, 2026
| </ItemGroup> | ||
|
|
||
| <Target Name="BunInstall" Inputs="$(WebAppDir)\package.json" Outputs="$(WebAppDir)\node_modules\.install-stamp"> | ||
| <Target Name="DetectBun" BeforeTargets="BunInstall"> |
Member
There was a problem hiding this comment.
Extract this target to its own file, and reuse it in the three projects.
MrJul
reviewed
Mar 26, 2026
| } | ||
| catch | ||
| { | ||
| Information("Bun.Unofficial.Tool not supported on this platform, using system-installed bun"); |
Member
There was a problem hiding this comment.
This is a bit misleading, as Bun can fail for "normal" reasons and this message will be printed instead. Do we have a specific exit code we can detect? Or just special case win-arm64.
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.
TL;DR When building on Windows ARM64, there were two problems:
@chialab/esbuild-plugin-html, which build in dependencies that wouldn't work on win-arm64.This PR refactors it so:
Checking the gz HTML and JS embedded between 12.0.0-rc1 and the local build on my ARM laptop, as far as I can tell, they look the same and are functionally the same.
Copilot stuff below:
This pull request improves cross-platform compatibility for Bun usage in build scripts, updates the webapp build process, and removes an unnecessary dependency. The changes ensure that the build works seamlessly on platforms where
Bun.Unofficial.Toolis unsupported (such as Windows ARM64) by falling back to a system-installedbunbinary. Additionally, the webapp build process is modernized and simplified.Cross-platform Bun detection and usage:
.csprojfiles and the Nuke build script to attempt usingBun.Unofficial.Toolviadnxfirst, and fall back to a system-installedbunif not supported. This logic is now centralized and consistent across the build, designer support, and test projects, improving reliability on platforms like win-arm64. [1] [2] [3] [4]Webapp build process improvements:
index.htmltoindex.tsx, and replaced the@chialab/esbuild-plugin-htmlplugin with a custom inline HTML plugin to generate the finalindex.html. This simplifies the build process and ensures the output HTML references the correct hashed JS bundle. [1] [2]esbuildversion inpackage.jsonto^0.25.0and removed the now-unused@chialab/esbuild-plugin-htmldependency.closes #20853