Add PackageDependenciesDesignTime to cache assets file#28405
Add PackageDependenciesDesignTime to cache assets file#28405dsplaisted merged 3 commits intorelease/7.0.2xxfrom
Conversation
0f4c1e7 to
d383ef0
Compare
src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs
Show resolved
Hide resolved
8a2df1e to
2bb5447
Compare
dsplaisted
left a comment
There was a problem hiding this comment.
See comments for ways we should be able to eliminate a bunch of the code here and process less data.
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets
Show resolved
Hide resolved
4cbdba9 to
3ea4ca2
Compare
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets
Outdated
Show resolved
Hide resolved
dsplaisted
left a comment
There was a problem hiding this comment.
This is looking good, thanks.
Have you made any progress with @drewnoakes on running the project system tests with these changes?
Also do you have any perf testing results? It would be great to be able to present those (or a demo) at the next team showcase.
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets
Show resolved
Hide resolved
3e72d15 to
5abc8f9
Compare
a78a033 to
8ad26ff
Compare
8ad26ff to
f113f2e
Compare
| string projectAssetsJsonPath = Path.GetTempFileName(); | ||
| string projectCacheAssetsJsonPath = Path.GetTempFileName(); |
There was a problem hiding this comment.
The test should delete both of these files when it completes, to avoid polluting the temp dir.
The same is true for other tests below.
|
@marcin-krystianc I see that the repository https://github.com/marcin-krystianc/TestSolutions/tree/master/LargeAppWithPrivatePackagesCentralisedNGBVRemoved does not contain any readme file nor a license. We would like to know if we are allowed to share this with folks. |
Hi @ocallesp, I'll add some readme and license information, but of course it is ok to share it with others. |
|
@marcin-krystianc I appreciate your willingness to share your repository with others. |
Fixes #27738
Implements reading the PackageDefinitions and
PackageDependenciesitems inResolvePackageAssets, so thatResolvePackageDependenciesdoesn't need to be called at all unlessEmitLegacyAssetsFileItemsis true. This improve incremental build perf and also significantly improve the design time build perf (23%) for this large solution scenario by saving to the cache file the same items generated fromPreprocessPackageDependenciesDesignTime.Note:
This implementation was taken from
PreprocessPackageDependenciesDesignTime.ExecuteCore