Skip to content

Conversation

@MichaelSimons
Copy link
Member

@MichaelSimons MichaelSimons commented Mar 26, 2025

Fixes dotnet/source-build#4924

Requires dotnet/source-build-reference-packages#1210 which is flowing in with #47917 and a rebootstrap.

@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Mar 26, 2025
@MichaelSimons MichaelSimons marked this pull request as ready for review March 28, 2025 20:44
Copilot AI review requested due to automatic review settings March 28, 2025 20:44
@MichaelSimons MichaelSimons requested review from a team as code owners March 28, 2025 20:44
@MichaelSimons MichaelSimons removed the request for review from a team March 28, 2025 20:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the SBRP Usage Report task by adding support for target packs and scanning project.assets.json files to capture package download information.

  • Updates the ReadSbrpPackages method to use a new directory structure.
  • Introduces a new TrackPackageReference method to consolidate package reference tracking.
  • Modifies package scanning to process DownloadDependencies in addition to traditional library references.
Files not reviewed (1)
  • src/SourceBuild/content/eng/Versions.props: Language not supported
Comments suppressed due to low confidence (1)

src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/WriteSbrpUsageReport.cs:191

  • The use of '[]' to initialize referencedTfms is not valid C# syntax. Consider replacing it with 'new HashSet()' to correctly instantiate an empty HashSet.
referencedTfms = [];

}
}

private void TrackPackageReference(string lockFilePath, string? name, string? version, IEnumerable<string>? tfms)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have an empty enumerable rather than it be nullable. That should simplify the implementation a bit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with 5290ff0.

@MichaelSimons MichaelSimons requested a review from mthalman March 28, 2025 21:48
@MichaelSimons MichaelSimons merged commit 532dc9d into dotnet:main Mar 31, 2025
39 checks passed
@MichaelSimons MichaelSimons deleted the sbrp-report-downloads branch March 31, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update SBRP usage report to scan for package downloads

3 participants