Skip to content

Theztefan/uv detector improvements#1844

Open
ryanbrandenburg wants to merge 15 commits into
mainfrom
theztefan/uv-detector-improvements
Open

Theztefan/uv detector improvements#1844
ryanbrandenburg wants to merge 15 commits into
mainfrom
theztefan/uv-detector-improvements

Conversation

@ryanbrandenburg

Copy link
Copy Markdown
Contributor

This is the same PR as #1631, just updated for the changes since February. All credit goes to @theztefan.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the uv.lock detector to better reflect uv’s lockfile semantics by expanding dev-dependency handling and adding support for git-sourced packages, improving the accuracy of the produced dependency graph.

Changes:

  • Parse all [package.metadata.requires-dev] groups (not just dev) and classify dev-only packages via transitive reachability.
  • Register git-sourced uv packages as GitComponent (repository URL + commit hash).
  • Add/extend tests and documentation for the new behaviors.
Show a summary per file
File Description
test/Microsoft.ComponentDetection.Detectors.Tests/UvLockDetectorTests.cs Adds coverage for multiple dev groups, transitive dev propagation, and git source handling.
src/Microsoft.ComponentDetection.Detectors/uv/UvSource.cs Extends the uv source model to include git.
src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Implements transitive dev-only classification and GitComponent registration.
src/Microsoft.ComponentDetection.Detectors/uv/UvLock.cs Parses source.git and aggregates dev deps across all requires-dev groups.
docs/detectors/uv.md Documents dev reachability classification and git-sourced component behavior.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 15:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Low


internal static HashSet<string> GetTransitivePackages(IEnumerable<string> roots, List<UvPackage> packages)
{
var lookup = packages.ToDictionary(p => p.Name, p => p, StringComparer.OrdinalIgnoreCase);
Copilot AI review requested due to automatic review settings July 14, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Low

Copilot AI review requested due to automatic review settings July 14, 2026 18:49
@github-actions

Copy link
Copy Markdown

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Low

Copilot AI review requested due to automatic review settings July 14, 2026 22:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread test/Microsoft.ComponentDetection.Detectors.Tests/UvLockDetectorTests.cs Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 23:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread test/Microsoft.ComponentDetection.Detectors.Tests/UvLockDetectorTests.cs Outdated
Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvPackage.cs
Copilot AI review requested due to automatic review settings July 14, 2026 23:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Low

Comment thread src/Microsoft.ComponentDetection.Detectors/uv/UvLockComponentDetector.cs Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Low

Copilot AI review requested due to automatic review settings July 15, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Low

Copilot AI review requested due to automatic review settings July 15, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Low

Copilot AI review requested due to automatic review settings July 15, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Low

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