Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#1185) Add original powershell host run as deprecated method #2831

Merged
merged 2 commits into from
Sep 24, 2022

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

This pull request updates the PowershellService class and interface to re-add the original run_host method to prevent the need to do a breaking release.

Motivation and Context

We need to keep the old method contract around until we create a new breaking major release of Chocolatey CLI so it will be backwards compatible with other projects we own, or projects that make use of the Chocolatey.Lib API library.

Testing

  1. Built Chocolatey Licensed Extension together with this change.

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)
  • PowerShell code changes.

Related Issue

#1185
https://app.clickup.com/t/20540031/ENGTASKS-1480

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed.
  • PowerShell v2 compatibility checked.

@AdmiringWorm AdmiringWorm self-assigned this Sep 23, 2022
@choco-bot
Copy link

Task linked: ENGTASKS-1480 Chocolatey CLI

@AdmiringWorm AdmiringWorm requested a review from corbob September 23, 2022 11:00
@coveralls
Copy link

coveralls commented Sep 23, 2022

Coverage Status

Coverage increased (+0.05%) to 27.629% when pulling 96b9ebe on AdmiringWorm:deprecate-old-run-host into 3892cfb on chocolatey:develop.

Changing the interface or public methods are breaking changes which
we need to wait with implementing before the next major release.
As such, this commit adds back the old way of running the powershell
host by adding an overload with the original contract for the interface
that could possibly be used in other projects that makes use of the
Chocolatey.Lib library.

This overload has been made obsolete and will just call the new method
while setting any hook scripts as empty enumerables.
Copy link
Member

@corbob corbob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@corbob
Copy link
Member

corbob commented Sep 24, 2022

Thanks for spotting this and getting it fixed up @AdmiringWorm!

@corbob corbob merged commit d08d1f6 into chocolatey:develop Sep 24, 2022
@AdmiringWorm AdmiringWorm deleted the deprecate-old-run-host branch April 4, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants