Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Fix circular dependency in WasmAppBuilder #58904

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

radical
Copy link
Member

@radical radical commented Sep 9, 2021

Fixes #58816

@ghost
Copy link

ghost commented Sep 9, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #58816

Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: -

@MichaelSimons
Copy link
Member

A friendly reminder to port to release/6.0.

I'm not knowledgeable enough in this area to provide a code review.

@lewing
Copy link
Member

lewing commented Sep 9, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1218880686

@radical
Copy link
Member Author

radical commented Sep 10, 2021

Windows test failures are #58927 .

@radical
Copy link
Member Author

radical commented Sep 10, 2021

iOSSimulator build is failing with multiple errors in copying files with because it is being used by another process:

##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.threading.tasks.dataflow/4.9.0/lib/netstandard2.0/System.Threading.Tasks.Dataflow.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Threading.Tasks.Dataflow.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Threading.Tasks.Dataflow.dll' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.reflection.metadataloadcontext/4.7.1/lib/netstandard2.0/System.Reflection.MetadataLoadContext.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.MetadataLoadContext.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.MetadataLoadContext.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.reflection.metadataloadcontext/4.7.1/lib/netstandard2.0/System.Reflection.MetadataLoadContext.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.MetadataLoadContext.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.MetadataLoadContext.dll' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.reflection.metadata/1.8.0/lib/netstandard2.0/System.Reflection.Metadata.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.Metadata.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.Metadata.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.reflection.metadata/1.8.0/lib/netstandard2.0/System.Reflection.Metadata.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.Metadata.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Reflection.Metadata.dll' because it is being used by another process. 
  WasmBuildTasks -> /Users/runner/work/1/s/artifacts/bin/WasmBuildTasks/Debug/net6.0/WasmBuildTasks.dll
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.security.principal.windows/4.7.0/lib/net461/System.Security.Principal.Windows.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.security.principal.windows/4.7.0/lib/net461/System.Security.Principal.Windows.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.security.principal.windows/4.7.0/lib/net461/System.Security.Principal.Windows.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.security.principal.windows/4.7.0/lib/net461/System.Security.Principal.Windows.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Security.Principal.Windows.dll' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.text.json/4.7.0/lib/net461/System.Text.Json.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.text.json/4.7.0/lib/net461/System.Text.Json.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: Could not copy "/Users/runner/work/1/s/.packages/system.text.json/4.7.0/lib/net461/System.Text.Json.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(4823,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/.packages/system.text.json/4.7.0/lib/net461/System.Text.Json.dll" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/System.Text.Json.dll' because it is being used by another process. 
  WasmBuildTasks -> /Users/runner/work/1/s/artifacts/bin/WasmBuildTasks/Debug/net6.0/publish/
  WasmAppBuilder -> /Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(5174,5): error MSB3026: Could not copy "/Users/runner/work/1/s/artifacts/obj/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(5174,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/artifacts/obj/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config' because it is being used by another process. 
/Users/runner/work/1/s/.dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(5174,5): error MSB3026: Could not copy "/Users/runner/work/1/s/artifacts/obj/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config' because it is being used by another process.  [/Users/runner/work/1/s/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj]
##[error].dotnet/sdk/6.0.100-rc.1.21430.12/Microsoft.Common.CurrentVersion.targets(5174,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "/Users/runner/work/1/s/artifacts/obj/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config" to "/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/WasmAppBuilder/Debug/net472/WasmAppBuilder.dll.config' because it is being used by another process. 

Are these just intermittent errors, or is this PR breaking something?
@steveisok any idea?

@steveisok
Copy link
Member

First I've seen something like this 🤷‍♂️

@radical
Copy link
Member Author

radical commented Sep 13, 2021

The test failures are on Windows11 - #58927, unrelated to this PR.


<!-- needed for publishing with multi-targeting. We are publishing essentially to get the SR.MetadataLoadContext.dll :/ -->
<ItemGroup>
<_PublishFramework Include="$(TargetFrameworks)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Publish" Properties="TargetFramework=%(_PublishFramework.Identity)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Publish" Properties="TargetFramework=%(_PublishFramework.Identity);_RunningForPublishBuilder=true" />
Copy link
Member

Choose a reason for hiding this comment

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

Global properties added to MSBuild invocation. This is a recipe for a build race condition. The global property defeats the MSBuild results cache and also can cause concurrent builds to the same path if the global property doesn’t change output directories.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source-build encounters circular PublishBuilder dependency in WasmAppBuilder
5 participants