Repository navigation
[wasm] Build doesn't rebuild when certain properties change #94595
Copy link
Copy link
Open
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearch-wasmWebAssembly architectureWebAssembly architecturearea-Build-mono
Milestone
Description
Activity
- ghost addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Nov 10, 2023 - removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Nov 10, 2023 It should be using dotnet.*wasm from the runtime pack.
p:WasmBuildNative=true:Copying file from "/workspaces/runtime/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm/Release/runtimes/browser-wasm/native/dotnet.native.wasm" to "/workspaces/runtime/src/mono/sample/wasm/console-v8/bin/browser-wasm/dotnet.native.wasm".WasmBuildNative=false:Did not copy from file "/workspaces/runtime/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm/Release/runtimes/browser-wasm/native/dotnet.native.wasm" to file "bin/browser-wasm/dotnet.native.wasm" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.
Judging by the message, it's an expected behavior. However, when we pass:
WasmBuildNative=false SkipUnchangedFiles=false:Did not copy from file "/workspaces/runtime/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm/Release/runtimes/browser-wasm/native/dotnet.native.wasm" to file "bin/browser-wasm/dotnet.native.wasm" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.
We should have a way of passing
SkipUnchangedFilesto the target that copies toAppBundle.We should have a way of passing SkipUnchangedFiles to the target that copies to AppBundle.
That's an implementation detail. For this issue you will probably need to track some important properties for every build, so save their values during a build. And when a subsequent one is done then you can compare whether any of the important properties changed, and if so trigger a native rebuild.
Reacted by Marek Fišera- addedPriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the release
on Jan 13, 2025
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearch-wasmWebAssembly architectureWebAssembly architecturearea-Build-mono
Description
Changing certain msbuild properties doesn't cause the app to be rebuilt.
Reproduction Steps
In src/mono/sample/wasm/console-v8:
time make MSBUILD_ARGS="/p:WasmBuildNative=true"time make MSBUILD_ARGS="/p:WasmBuildNative=false"-> the second one doesn't rebuild. It should be using dotnet.*wasm from the runtime pack.
time make MSBUILD_ARGS="/p:WasmBuildNative=true /p:WasmNativeStrip=false"time make MSBUILD_ARGS="/p:WasmBuildNative=true /p:WasmNativeStrip=true"-> the second one doesn't rebuild
time make MSBUILD_ARGS=""time make MSBUILD_ARGS="/p:WasmEnableWebcil=false"-> the second one doesn't rebuild.
Expected behavior
Rebuilds.
Actual behavior
.
Regression?
No response
Known Workarounds
No response
Configuration
dotnet/runtime master
Other information
No response