PoshCode / Configuration

A module to help other modules have settings
MIT License
176 stars 27 forks source link

1.5.x Breaking Change: Metadata commands are now external #47

Closed justinainsworth closed 2 years ago

justinainsworth commented 2 years ago

I utilize Configuration in a Build pipeline, and today i started having build failures, with the error "The term 'Add-MetadataConverter' is not recognized as the name of a cmdlet, function, script file, or operable program.".

From looking at the latest commits, it looks like a bunch of commands were removed. Was this intentional? Any reason the major number wasn't updated since it contains breaking changes?

I don't explicitly call add-metadataconverter, but it appears to be called as part of the module loading.

WARNING: TargetObject: Add-MetadataConverter WARNING: CategoryInfo: ObjectNotFound: (Add-MetadataConverter:String) [], ActionPreferenceStopException WARNING: FullyQualifiedErrorId: CommandNotFoundException WARNING: InvocationInfo: System.Management.Automation.InvocationInfo WARNING: MyCommand:
WARNING: BoundParameters: System.Collections.Generic.Dictionary`2[System.String,System.Object] WARNING: UnboundArguments:
WARNING: ScriptLineNumber: 11 WARNING: OffsetInLine: 5 WARNING: HistoryId: 1 WARNING: ScriptName: C:\Program Files\WindowsPowerShell\Modules\Configuration\1.5.1\Configuration.psm1 WARNING: Line: Add-MetadataConverter $Converters WARNING: PositionMessage: At C:\Program Files\WindowsPowerShell\Modules\Configuration\1.5.1\Configuration.psm1:11 char:5

justinainsworth commented 2 years ago

Looking at the most recent pull request, i see that the metadata functions have been extracted into there own module. Added that module to my required modules has resolved my issue, but it still seems like this release should have been a major version change.

Jaykul commented 2 years ago

Well ... you're not wrong. Adding the extra module probably should have been marked as a breaking change.

The only reason it wasn't is that Metadata has always been a separate module, and installing the Configuration module through normal means (that is, via PowerShellGet) automatically installs Metadata, and once installed, importing one imports the other. I believed it wouldn't break anything.

In hindsight, anyone using the commands with an explicit module name reference will be broken, and anyone building from source, etc.

I apologize.

Jaykul commented 2 years ago

I'm also really sorry I don't pay more attention to the issue trackers!

I don't think I can do anything about this now, however -- no point making a breaking release after 1.5 is already out. I'm going to close this. Feel free to reopen if you think there's something I can do to address it.