Skip to content

[wasm] Build doesn't rebuild when certain properties change #94595

Description

@vargaz

Description

Changing certain msbuild properties doesn't cause the app to be rebuilt.

Reproduction Steps

In src/mono/sample/wasm/console-v8:

  1. 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.
  2. 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
  3. WasmEnableWebcil
    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

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Nov 10, 2023
  2. vargaz commented on Nov 10, 2023

    @vargaz
    ContributorAuthor
  3. self-assigned this
    on Nov 10, 2023
  4. removed
    untriagedNew issue has not been triaged by the area owner
    on Nov 10, 2023
  5. added this to the 9.0.0 milestone on Nov 10, 2023
  6. ilonatommy commented on May 31, 2024

    @ilonatommy
    Member

    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.

  7. radical commented on Jun 1, 2024

    @radical
    Member

    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.

  8. self-assigned this
    on Jun 4, 2024
  9. modified the milestones: 9.0.0, 10.0.0 on Jul 24, 2024
  10. added
    Priority:2Work that is important, but not critical for the release
    on Jan 13, 2025
  11. modified the milestones: 10.0.0, Future on Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearch-wasmWebAssembly architecturearea-Build-mono

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions