jborean93 / PowerShell-Yayaml

A YAML parser and writer that uses an Assembly Load Context on PowerShell 7+
MIT License
30 stars 2 forks source link

Module exported cmdlets break with `Import-Module YAYAML -Force` #11

Closed homotechsual closed 10 months ago

homotechsual commented 10 months ago

Force reimporting the module into an existing session breaks the exported cmdlets. The module is loaded with blank values for ExportedCmdlets (and everything else)

Not a major issue - I shouldn't have been using -Force anyway but maybe worth noting in case it's fixable.

jborean93 commented 10 months ago

Thanks for the report. This looks to be a bug in PowerShell in how it treats a nested assembly in a module used here for the ALC setup. I've opened https://github.com/PowerShell/PowerShell/issues/20710 as I was unable to track down the problem and hopefully someone more knowledgeable on the pwsh team can do so.

I do have https://github.com/jborean93/PowerShell-Yayaml/pull/12 as a workaround but depending on the resolution of the pwsh bug I may or may not actually merge it.

homotechsual commented 10 months ago

Cool :-)