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

[WIP] Fix isExplicitReferencedDependency in Poetry Detector #620

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public PoetryComponentDetector(

public override IEnumerable<ComponentType> SupportedComponentTypes => new[] { ComponentType.Pip };

public override int Version { get; } = 2;
public override int Version { get; } = 3;

public override IEnumerable<string> Categories => new List<string> { "Python" };

Expand All @@ -53,12 +53,12 @@ protected override async Task OnFileFoundAsync(ProcessRequest processRequest, ID
if (package.Source != null && package.Source.Type == "git")
{
var component = new DetectedComponent(new GitComponent(new Uri(package.Source.Url), package.Source.ResolvedReference));
singleFileComponentRecorder.RegisterUsage(component, isDevelopmentDependency: isDevelopmentDependency);
singleFileComponentRecorder.RegisterUsage(component, isExplicitReferencedDependency: true, isDevelopmentDependency: isDevelopmentDependency);
}
else
{
var component = new DetectedComponent(new PipComponent(package.Name, package.Version));
singleFileComponentRecorder.RegisterUsage(component, isDevelopmentDependency: isDevelopmentDependency);
singleFileComponentRecorder.RegisterUsage(component, isExplicitReferencedDependency: true, isDevelopmentDependency: isDevelopmentDependency);
}
});
await Task.CompletedTask;
Expand Down