Open Gijsreyn opened 2 weeks ago
It is probably DscResource.DocGenerator tasks that need to be refactored. Are the tasks that runs PlatyPS in Sampler used by anyone?
I still use this one: https://github.com/gaelcolas/Sampler/blob/main/.build/tasks/generateHelp.PlatyPS.build.ps1. If you want, I can take a look and rewrite it.
How much refactor will be needed? Thinking if there gonna be any breaking changes π€ But please send in a PR π
Tbh, I already wanted to write some code, but spend my time around the winget-dsc
area. At least it gave me some thoughts.
The new Microsoft.PowerShell.PlatyPS
has new cmdlets. I wanted to introduce a new task, say something like: generateHelp.MSPlatyPS.build.ps1
. New cmdlets will be added in here. The challenging part is mostly on the dlls loaded in the background. I think both use YamlDotnet
or some other variant. If you install both, assembly loading will fail. I don't know how much modules use the task, but simply replacing PlatyPS in the RequiredModules.psd1
with the new one - would do the trick.
That problem already exist with the current PlatyPS and is solved by running PlatyPS in a separate session so it is the only module using the dlls. Might need to do the same with this new module.
Do you mind sharing an example Johan? I tried searching for it, but couldn't find it :(
Clearly I wasn't watching with my eyes, thanks Johan.
Also, if you adding a new task, maybe look at DscResource.DocGenerator module and those tasks that generate help for public commands and external help and see if we should remove tasks there that will be covered by any changes here.
@johlju Unfortunately, I stumbled on a barrier. I opened a issue at PlatyPS repository. If you have any suggestions in the meantime to proceed further and see the impact of the change, please give me a shout :)
Is it the parameter HelpVersion
that is the issue? If so I suggest just setting it to the full version stripping the prerelease string, and if there is a change in the future for that property we can just remove the part that stripping prerelease string. π€
Problem description
With the preview release of
Microsoft.PowerShell.PlatyPS
, it would be great to include it in theRequiredModules.psd1
and move the task logic to use the new commands.Verbose logs
How to reproduce
N/A
Expected behavior
Use
Microsoft.PowerShell.PlatyPS
.Current behavior
Uses
PlatyPS
Suggested solution
Change the
RequiredModules.psd1
to include the module. Update the relevant doc tasks.Operating system the target node is running
PowerShell version and build the target node is running
Module version used