Configuration icon indicating copy to clipboard operation
Configuration copied to clipboard

1.5.1 Breaking changes

Open justinainsworth opened this issue 3 years ago • 1 comments

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

  • Add-MetadataConverter $Converters
    
  • ~~~~~~~~~~~~~~~~~~~~~
    

WARNING: PSScriptRoot: C:\Program Files\WindowsPowerShell\Modules\Configuration\1.5.1 WARNING: PSCommandPath: C:\Program Files\WindowsPowerShell\Modules\Configuration\1.5.1\Configuration.psm1 WARNING: InvocationName: Add-MetadataConverter WARNING: PipelineLength: 0 WARNING: PipelinePosition: 0 WARNING: ExpectingInput: False WARNING: CommandOrigin: Internal WARNING: DisplayScriptPosition:
WARNING: ScriptStackTrace: at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\Configuration\1.5.1\Configuration.psm1: line 11

justinainsworth avatar Jul 18 '22 20:07 justinainsworth

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.

justinainsworth avatar Jul 18 '22 21:07 justinainsworth

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 avatar Aug 17 '22 05:08 Jaykul

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.

Jaykul avatar Aug 17 '22 05:08 Jaykul