You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[wasm] Build doesn't rebuild when certain properties change #94595
Changing certain msbuild properties doesn't cause the app to be rebuilt.
Reproduction Steps
In src/mono/sample/wasm/console-v8:
WasmBuildNative 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.
WasmNativeStrip 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
WasmEnableWebcil time make MSBUILD_ARGS="" time make MSBUILD_ARGS="/p:WasmEnableWebcil=false"
-> the second one doesn't rebuild.
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 SkipUnchangedFiles to the target that copies to AppBundle.
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.
Activity
vargaz commentedon Nov 10, 2023
@radical
ilonatommy commentedon May 31, 2024
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.radical commentedon Jun 1, 2024
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.