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

Changes to support 'PVP flow' in source-build #6454

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

mmitche
Copy link
Member

@mmitche mmitche commented Jan 23, 2023

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.

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.
@mmitche mmitche requested a review from a team as a code owner January 23, 2023 18:17
@mmitche
Copy link
Member Author

mmitche commented Jan 23, 2023

@MichaelSimons
Copy link
Member

@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
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #6454 (a6557da) into main (df911e6) will decrease coverage by 0.01%.
The diff coverage is n/a.

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              

@mmitche
Copy link
Member Author

mmitche commented Jan 24, 2023

We still need someone from @dotnet/roslyn-analysis on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants