Skip to content

Public APIs missing in PowerShell 7.0.0-rc.2 since 6.2.3 #11619

@rjmholt

Description

@rjmholt

I've run an analysis comparing public APIs available in PowerShell 6.2.3 vs 7.0.0-rc.2 and there are some public APIs that are missing.

While this is in many cases intentional, and likely to not be an issue, some may affect programs and tools trying to link against multiple versions of PowerShell (modules and some hosts). Trying to reference such an API would cause a sudden crash in one of these tools (the hard part being that the point at which the crash occurs may be hard to control).

I'm still refining the analysis, but here is a list of classes and members that have been removed:

Types

  • System.Management.Automation.PSJobProxy [Workflow]
  • System.Management.Automation.PSChildJobProxy [Workflow]
  • System.Management.Automation.JobDataAddedEventArgs [Workflow]
  • System.Management.Automation.PowerShellStreamType (arguably workflow, but has generic name and namespace. Removed in Cleanup workflow - remove PSProxyJob #10083).
  • System.Management.Automation.WorkflowInfo [Workflow]
  • System.Management.Automation.Runspaces.PSSessionType (arguably workflow, but possibly worth restoring with single value depending on how it's used) Discussed with @daxian-dbw and @adityapatwardhan and decided that this is workflow-specific

Fields

  • System.Management.Automation.CommandTypes::Workflow [Workflow]
  • System.Management.Automation.PSEngineEvent::WorkflowJobStartEvent [Workflow]
  • System.Management.Automation.ModuleType::Workflow [Workflow]
  • System.Management.Automation.Internal.DebuggerUtils::SetVariableFunction [Internal]
  • System.Management.Automation.Internal.DebuggerUtils::RemoveVariableFunction [Internal]
  • System.Management.Automation.Internal.DebuggerUtils::GetPSCallStackOverrideFunction [Internal]
  • System.Management.Automation.Internal.PSMonitorRunspaceType::WorkflowInlineScript [Internal/Workflow]

Methods and constructors (captures events and properties)

  • Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache::ImportClasses(System.String,System.Tuple`2[System.String,System.Version],System.Collections.ObjectModel.Collection`1[System.Exception]) [Internal]
  • Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscClassCache::GetCachedClasses() [Internal]
  • Microsoft.PowerShell.Commands.NewModuleManifestCommand::get_ClrVersion() Fixed in Change name of ClrVersion parameter back #11623
  • Microsoft.PowerShell.Commands.NewModuleManifestCommand::set_ClrVersion(System.Version) Fixed in Change name of ClrVersion parameter back #11623
  • Microsoft.PowerShell.Commands.RegisterPSSessionConfigurationCommand::get_SessionType() [Workflow]
  • Microsoft.PowerShell.Commands.RegisterPSSessionConfigurationCommand::set_SessionType(System.Management.Automation.Runspaces.PSSessionType) [Workflow]
  • Microsoft.PowerShell.Commands.InternalSymbolicLinkLinkCodeMethods::GetTarget(System.Management.Automation.PSObject) (arguably internal, but not internally namespaced. Return type changed in Removing Hardlink from Mode property in default file system format #8789) Discussed with @daxian-dbw and @adityapatwardhan and decided that this is ok to remove
  • System.Management.Automation.Debugger::SetBreakpoints(System.Collections.Generic.IEnumerable`1[System.Management.Automation.Breakpoint]) Fixed in Restore SetBreakpoints API #11622
  • System.Management.Automation.PowerShell::AsJobProxy() [Workflow]
  • System.Management.Automation.ScriptBlock::set_IsFilter(System.Boolean) Formerly threw InvalidOperationException. Should assess whether this is considered breaking. Changed in Code Cleanup: Tidy up scriptblock.cs #9732 Discussed with @daxian-dbw and @adityapatwardhan and decided that this is not a real breaking change
  • System.Management.Automation.ScriptBlock::set_IsConfiguration(System.Boolean) Formerly threw InvalidOperationException. Should assess whether this is considered breaking. Changed in Code Cleanup: Tidy up scriptblock.cs #9732 Discussed with @daxian-dbw and @adityapatwardhan and decided that this is not a real breaking change
  • System.Management.Automation.PSModuleInfo::get_ExportedWorkflows() [Workflow]
  • System.Management.Automation.Tracing.Tracer::EndpointRegistered(System.String,System.String,System.String) Removed in Remove Workflow from PSSessionType #9618 Discussed with @daxian-dbw, @adityapatwardhan and @JamesWTruher and decided that being a workflow-oriented, Windows-only API, this break is ok
  • System.Management.Automation.Internal.DebuggerUtils::GetWorkflowDebuggerFunctions() [Internal/Workflow]

I'll continue this analysis to look into custom attributes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions