OneGet / oneget

PackageManagement (aka OneGet) is a package manager for Windows
MIT License
2.38k stars 190 forks source link

DSC PackageManagement Resource: Support for multiple versions of a module #478

Open jwittner opened 4 years ago

jwittner commented 4 years ago

It's often the case that multiple versions of a module need to be present on a machine. Unfortunately this case isn't supported (far as I can tell) by the PackageManagement DSC resource because the resource key is used as the package name and so you get conflicts if you attempt to list multiple resources to get different versions installed side by side:

A conflict was detected between resources '[PackageManagement]UnityTest (::94::9::PackageManagement)' and '[PackageManagement]UnityTest2 (::103::9::PackageManagement)' in node 'Agent'. Resources have identical key properties but there are differences in the following non-key properties: 'RequiredVersion'. Values '1.0.8126' don't match values '2.0.12499'. Please update these property values so that they are identical in both cases.

Thinking on remedies - perhaps I could modify this resource in a backwards compatible way to accept a list of versions in the RequiredVersion property and it would apply the action for all versions listed?

SydneyhSmith commented 4 years ago

@jwittner thanks for opening this issue, and for starting to think of ways to solve it...we are actually currently in the process of moving away from using PackageManagement by re-writing PowerShellGet without this dependency...as a result we are currently only accepting security fixes to PackageManagement... many of our DSC rescources are community driven efforts so if we have the community support we may be able to port these resources...thanks again!

jwittner commented 4 years ago

Thanks for the info @SydneyhSmith! Is there a roadmap for this rewrite? What DSC resources will be provided for the new PowerShellGet implementation?

SydneyhSmith commented 4 years ago

@jwittner this is where we are trackign the plan for PowerShellGet 3.0: https://github.com/PowerShell/PowerShell-RFC/pull/185/files Thanks!