Skip to content

Get-Package object missing important dependency info #11055

Closed

Description

@MartinHBA

Summary of the new feature/enhancement

When you want to list dependencies for package using this command:

(get-package -provider Nuget -name System.memory | select dependencies).dependencies

result is list of dependencies and you can see lot of duplicates.

nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Numerics.Vectors/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Diagnostics.Debug/4.3.0
nuget:System.Globalization/4.3.0
nuget:System.Reflection/4.3.0
nuget:System.Resources.ResourceManager/4.3.0
nuget:System.Runtime/4.3.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Runtime.Extensions/4.3.0
nuget:System.Runtime.InteropServices/4.3.0
nuget:System.Buffers/4.4.0
nuget:System.Numerics.Vectors/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2
nuget:System.Buffers/4.4.0
nuget:System.Runtime.CompilerServices.Unsafe/4.5.2

Reason is that this command retrieves list of all dependencies regardless of platform/target Framework. Simply it puts it all in one basket.
However nuget is showing dependencies based on platform/framework

.NETCoreApp 2.0
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
.NETCoreApp 2.1
No dependencies.
.NETFramework 4.5
System.Buffers (>= 4.4.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
.NETFramework 4.6.1
System.Buffers (>= 4.4.0)
System.Numerics.Vectors (>= 4.4.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
.NETStandard 1.1
System.Buffers (>= 4.4.0)
System.Diagnostics.Debug (>= 4.3.0)
System.Globalization (>= 4.3.0)
System.Reflection (>= 4.3.0)
System.Resources.ResourceManager (>= 4.3.0)
System.Runtime (>= 4.3.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
System.Runtime.Extensions (>= 4.3.0)
System.Runtime.InteropServices (>= 4.3.0)
.NETStandard 2.0
System.Buffers (>= 4.4.0)
System.Numerics.Vectors (>= 4.4.0)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
...

Proposed technical implementation details (optional)

Dependencies should be returned as table, for each platform/framework
with fields "Provider","Name","RequiredVersion","Platform"
then I can query result with

where -Platform -eq ".NETCoreApp 2.0" 

which will return 1 dependency only

Activity

  1. added
    Issue-Enhancement
    on Nov 12, 2019
  2. iSazonov commented on Nov 15, 2019

    @iSazonov
    Collaborator

    MartinHBA Please move your report to right repo https://github.com/OneGet/oneget

    GitHub
    PackageManagement (aka OneGet) is a package manager for Windows - OneGet/oneget
  3. added
    Resolution-External
    on Nov 15, 2019
  4. MartinHBA commented on Nov 15, 2019

    @MartinHBA
    Author

    Ilya (@iSazonov) thx! I moved this to correct location

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

    Issue-EnhancementResolution-External

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions