-
Notifications
You must be signed in to change notification settings - Fork 470
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
Changes to support 'PVP flow' in source-build #6454
Conversation
PVP flow is a method of flowing dependencies in source build that only overrides versions of packages that the repo has a declared dependency on in Version.Details.xml. This means that the package flow is closer to the Microsoft's way of building .NET. To enable this for roslyn-analyzers, we just need to add dependencis on the packages that should be overridden in source build. In this case, it's the compiler toolset package, and the Microsoft.CodeAnalysis package. I also cleaned up the CodeAnalysisVersion property to match the package name, however, I generally avoided adding dependencies that do not participate in source build. For example, System.CommandLine is used only in tooling that is not included in SB. It may be worth adding these dependencies to make it easier to track and update dependencies. To fully enable PVP flow, the repo project in the VMR will needto set `<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>` once these changes flow in.
@MichaelSimons Could this patch https://github.com/dotnet/installer/blob/main/src/SourceBuild/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch be integrated and removed (at least partially)? it seems like the package version props path import code, at the very least, is dead. |
Yes you are correct. Part of the patch should be backported and other parts should be solved by the per repo pvp work. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6454 +/- ##
==========================================
- Coverage 96.14% 96.14% -0.01%
==========================================
Files 1365 1365
Lines 317523 317523
Branches 10269 10269
==========================================
- Hits 305295 305291 -4
- Misses 9790 9794 +4
Partials 2438 2438 |
We still need someone from @dotnet/roslyn-analysis on this. |
PVP flow is a method of flowing dependencies in source build that only overrides versions of packages that the repo has a declared dependency on in Version.Details.xml. This means that the package flow is closer to the Microsoft's way of building .NET.
To enable this for roslyn-analyzers, we just need to add dependencis on the packages that should be overridden in source build. In this case, it's the compiler toolset package, and the Microsoft.CodeAnalysis package. I also cleaned up the CodeAnalysisVersion property to match the package name, however, I generally avoided adding dependencies that do not participate in source build. For example, System.CommandLine is used only in tooling that is not included in SB. It may be worth adding these dependencies to make it easier to track and update dependencies.
To fully enable PVP flow, the repo project in the VMR will needto set
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
once these changes flow in.