Skip to content

Conversation

maraf
Copy link
Member

@maraf maraf commented Aug 25, 2025

  • Append unique guid for every execution of ConvertDllsToWebcil to the temp files path
  • Use "move" filesystem operation instead of "copy" if temp file is different than the final one

Contributes to dotnet/aspnetcore#61987

@maraf maraf requested review from pavelsavara, javiercn and a team August 26, 2025 06:58
@maraf maraf marked this pull request as ready for review August 26, 2025 06:58
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 06:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the file handling in the WebCil conversion process for WebAssembly by implementing two key optimizations: using unique temporary directories to avoid conflicts and replacing file copy operations with more efficient move operations when possible.

  • Generates unique temporary directory paths using GUIDs to prevent conflicts during concurrent builds
  • Replaces copy operations with move operations for better performance when temporary and final files are different
  • Adds cleanup of temporary directories after processing

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ConvertDllsToWebCil.cs Updates temp directory creation with GUID uniqueness, adds directory cleanup, and switches from copy to move operations
Utils.cs Adds new MoveIfDifferent method with cross-framework compatibility for file move operations
Comments suppressed due to low confidence (1)

@maraf
Copy link
Member Author

maraf commented Sep 1, 2025

/ba-g Linux failure in PInvokeTableGeneratorTests.UnmanagedStructsAreConsideredBlittableFromDifferentAssembly has a Windows variant passing at https://helix.dot.net/api/jobs/adffa14d-7513-4e3b-b09e-82bb353cd520/workitems/Workloads-ST-Wasm.Build.Tests.PInvokeTableGeneratorTests?api-version=2019-06-17

@maraf maraf merged commit 14eb331 into dotnet:main Sep 1, 2025
155 of 158 checks passed
@maraf
Copy link
Member Author

maraf commented Sep 1, 2025

/backport to release/10.0-staging

@maraf maraf deleted the BrowserWebcilParallel2 branch September 1, 2025 10:55
Copy link
Contributor

github-actions bot commented Sep 1, 2025

Started backporting to release/10.0-staging: https://github.com/dotnet/runtime/actions/runs/17375531804

Copy link
Contributor

github-actions bot commented Sep 1, 2025

@maraf an error occurred while backporting to "release/10.0-staging", please check the run log for details!

Error: The specified backport target branch "release/10.0-staging" wasn't found in the repo.

@maraf
Copy link
Member Author

maraf commented Sep 2, 2025

/backport to release/10.0

Copy link
Contributor

github-actions bot commented Sep 2, 2025

Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17396752005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants