Skip to content

[wasm] Fix circular dependency in WasmAppBuilder - #58904

Merged
radical merged 1 commit into
dotnet:mainfrom
radical:fix-publish-builder
Sep 13, 2021
Merged

[wasm] Fix circular dependency in WasmAppBuilder#58904
radical merged 1 commit into
dotnet:mainfrom
radical:fix-publish-builder

Conversation

@radical

Copy link
Copy Markdown
Member

Fixes#58816

@ghost

ghost commented Sep 9, 2021

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Member

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

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

@radical

Copy link
Copy Markdown
MemberAuthor

Windows test failures are #58927 .

@radical

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Member

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

@radical

Copy link
Copy Markdown
MemberAuthor

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

<_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
Copy Markdown
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.

@ghostghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-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

@radical@MichaelSimons@lewing@steveisok@ericstj