Skip to content

packagedcode: add DotNetDepsJsonHandler to parse .deps.json files#4803

Open
kumarasantosh wants to merge 1 commit intoaboutcode-org:developfrom
kumarasantosh:feature/deps-json-handler
Open

packagedcode: add DotNetDepsJsonHandler to parse .deps.json files#4803
kumarasantosh wants to merge 1 commit intoaboutcode-org:developfrom
kumarasantosh:feature/deps-json-handler

Conversation

@kumarasantosh
Copy link

Fixes #4496

NuGet .deps.json files appear alongside .dll and .pdb files in .NET
projects but were not being parsed by ScanCode. This PR adds a new
DotNetDepsJsonHandler in nuget.py to handle these files.

The handler detects *.deps.json files, reads the libraries section
and extracts package names, versions, types and their dependencies.
Target framework is stored in extra_data.

Tested against a real world fixture from snoopwpf v5.1.0 release
and a minimal hand-crafted fixture for edge cases.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled and links the original issue above
  • Tests pass
  • Commits are in uniquely-named feature branch and has no merge conflicts

Add support for parsing NuGet .deps.json lockfiles which are present
alongside .dll and .pdb files in .NET projects and NuGet packages.

Extracts package names, versions, types and dependencies from the
libraries section of .deps.json files.

Fixes aboutcode-org#4496

Signed-off-by: kumarasantosh <santosh.pulikond02@gmail.com>
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.

Parse and get dependencies from .deps.json

1 participant