Skip to content

Feedback from scanning https://github.com/oss-review-toolkit/ort/tree/main/analyzer/src/funTest/assets/projects/synthetic/dotnet/subProjectTest #3

Description

@pombredanne

I received this report:

While scanning https://raw.githubusercontent.com/oss-review-toolkit/ort/236923c66aa73dd11fcaa77a8d89e77788ef71b6/analyzer/src/funTest/assets/projects/synthetic/dotnet/subProjectTest/test.csproj some questions came up.

The nuget-inspector was launched on Ubuntu 22.04 this way, using also a checkout of ORT:

./nuget-inspector –verbose \
   --project-file ort/analyzer/src/funTest/assets/projects/synthetic/dotnet/subProjectTest/test.csproj \
   --nuget-config ort/analyzer/src/funTest/assets/projects/synthetic/dotnet/nuget.config \
   --json nuget-inspector-result.json.txt

The output is this file nuget-inspector-result.json.txt

Packages detected by the nuget-inspector

(Note: the difference between packages and dependencies is everything but clear, hence both are listed)

$ cat nuget-inspector-result.json | jq ".packages[].packages[].package.purl"
"pkg:nuget/System.Globalization@4.3.0"
"pkg:nuget/System.Threading@4.0.11"
"pkg:nuget/Antlr@3.4.1.9004"
"pkg:nuget/Newtonsoft.Json@5.0.4"
"pkg:nuget/WebGrease@1.5.2"
"pkg:nuget/foobar@1.2.3"
"pkg:nuget/System.Threading.Tasks.Extensions@4.5.4"
$ cat nuget-inspector-result.json | jq ".packages[].dependencies[].purl"
"pkg:nuget/System.Globalization@4.3.0"
"pkg:nuget/System.Threading@4.0.11"
"pkg:nuget/WebGrease@1.5.2"
"pkg:nuget/foobar@1.2.3"
"pkg:nuget/System.Threading.Tasks.Extensions@4.5.4"

Packages in the expected ort result

$ cat dotnet-expected-output.yml | yq ".packages[].id"
NuGet::Antlr:3.4.1.9004
NuGet::Microsoft.NETCore.Platforms:1.0.1
NuGet::Microsoft.NETCore.Platforms:1.1.0
NuGet::Microsoft.NETCore.Targets:1.0.1
NuGet::Microsoft.NETCore.Targets:1.1.0
NuGet::Newtonsoft.Json:5.0.4
NuGet::System.Collections:4.3.0
NuGet::System.Globalization:4.3.0
NuGet::System.Runtime:4.1.0
NuGet::System.Runtime:4.3.0
NuGet::System.Runtime.CompilerServices.Unsafe:4.5.3
NuGet::System.Threading:4.0.11
NuGet::System.Threading.Tasks:4.0.11
NuGet::System.Threading.Tasks:4.3.0
NuGet::System.Threading.Tasks.Extensions:4.5.4
NuGet::WebGrease:1.5.2

Issues and questions

  1. The nuget-inspector currently doesn’t seem to support projects with a packages.config file, like this one: https://github.com/oss-review-toolkit/ort/tree/main/analyzer/src/funTest/assets/projects/synthetic/nuget

  2. There is no metadata listed at all in the nuget-inspector-result.json. This metadata would be required to replace the current NuGet implementation in ORT.

  3. TargetFrameworks seem to be ignored by the nuget-inspector. In the output you can see that System.Threading.Tasks.Extensions and System.Globalization are both listed. We need some way to tell the nuget-inspector which TargetFramework should be taken into account.

  4. The foobar@1.2.3 package is listed as a valid dependency, while it is explicitly in this test to check if the package manager fails if there is a non-resolvable package defined.

  5. Some transitive dependencies are missing in the output of the nuget-inspector. For instance Microsoft.NETCore.Platforms and System.Threading.Tasks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions