Suggestion on updating PSD1 metadata when a module is renamed
See original GitHub issueSummary of the new feature / enhancement
Off the back of #19742 and also the upcoming rename of PowerShellGet I realised that one of the core issues with module renaming is that it can cause downstream issues when users are using Explicit Module Loading or Fully Qualified Module Names or even as part of their build or packaging process of modules as part of any scripts or modules, and may also impact others in other ways too.
I’d Propose a suggested additional property in the PSData part of the PSD1 file of ModuleAlias
to enable simpler mitigation of issues like this going forward & reduce overall maintenance of build/release/production scripts & modules
This would then allow for easier module renames without breaking scripts as long as the engine would also be updated to check for this new property when autoloading modules or when Fully Qualified Module Names are used in scripts. It would also likely need additional work in PowerShellGet
/ PSResourceGet
to enable downloading this from the gallery using the Alias
This would be a nice to have to resolve what is classifiable as a self inflicted accidental & avoidable problem, but as products names and scope of modules change this could be a worthwhile investment to make.
Proposed technical implementation details (optional)
No response
Edited 27th July 2023
Minor amendment - instead of using ModuleAlias
in PSData within a manifest instead I’d suggest calling it PreviousModuleName
as this could be used as suggested above for some redirection text for users.
Edited 29th July 2023
Please see this issue in PSResourceGet for a better direction than originally suggested
Issue Analytics
- State:
- Created 4 months ago
- Reactions:3
- Comments:14 (1 by maintainers)
Thank you so much for this consideration and the insight shared. I appreciate the time, effort, and work that has been put into PowerShell. Thank you again!
Joseph Colvin
Message ID: @.***>
Thank you, Ryan, yet again, for sharing your knowledge with me {us?} as I did not know about this. I now will proceed to spend hours ‘googling’ how unique a GUID really is.
Joseph Colvin IT Coordinator Warwick Public Schoolhttps://www.warwick.k12.nd.us/
Message ID: @.***>