-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Respect CompatiblePSEditions field in module manifests, with sane default #6991
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scriptsauthoring cross-platform or cross-architecture modules, cmdlets, and scriptsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Milestone
Description
For Windows PowerShell/PowerShell Core modules to have a clear cross-compatibility story, we need PowerShell Core to respect the CompatiblePSEditions field.
This means, for PowerShell Core:
Get-Module -ListAvailablelists only those modules on the module path that are Core compatibleImport-Modulewill only import a module that is Core compatible and throw an error otherwise- The absence of the
CompatiblePSEditionsfield should imply a sane default. The current suggested default isCompatiblePSEditions = @('Desktop'), i.e. compatible with Windows PowerShell (since there is no such field in Windows PowerShell and modules written for it only would lack this field by default).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scriptsauthoring cross-platform or cross-architecture modules, cmdlets, and scriptsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime