Skip to content

Commit

Permalink
Add parallelism and copy-on-write links to Robocopy task (#462)
Browse files Browse the repository at this point in the history
* Add parallelism and copy-on-write links to Robocopy task
- Use the CopyOnWrite library and an action block to greatly speed up artifact copies. Use parallelism settings similar to those in the Microsoft.Build.CopyOnWrite SDK and allow turning off CoW linking with a task setting.
- Fix an overcopying bug where the same source:destination pair would be copied multiple times.
- Don't copy files onto themselves (seen in occasional cases).
- Linearize same-destination copies from different sources.
- Update major version of Artifacts.
- Unify on 'DisableCopyOnWrite' property for Copy and Artifacts
- Migrate CoW SDK Copy task to use CoW package for clone file compat checks.
- Fix possibility of under-copying different-cased files/paths on Linux by varying path comparers by OS. NOTE: Did not update the CoW Copy task, and MSBuild itself seems to use IgnoreCase in most cases. Need feedback here.
  • Loading branch information
erikmav authored Jul 17, 2023
1 parent c8f8485 commit 81e435b
Show file tree
Hide file tree
Showing 14 changed files with 764 additions and 91 deletions.
4 changes: 3 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<MicrosoftBuildPackageVersion>17.6.3</MicrosoftBuildPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CopyOnWrite" Version="0.3.6" Condition=" '$(TargetFramework)' != 'net46' " />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="16.9.0" Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'netstandard2.0'" />
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="15.9.20" Condition="'$(TargetFramework)' == 'net46'" />
Expand All @@ -15,9 +16,10 @@
<PackageVersion Include="MSBuild.ProjectCreation" Version="10.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="6.0.0" Condition=" '$(TargetFramework)' != 'net46' "/>
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="4.11.1" Condition=" '$(TargetFramework)' == 'net46' "/>
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="CopyOnWrite" Version="0.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<PackageReference Include="MSBuild.ProjectCreation" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Shouldly" />
<PackageReference Include="System.Threading.Tasks.Dataflow" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 81e435b

Please sign in to comment.