FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add -Runspace parameter to all *-PSBreakpoint cmdlets by KirkMunro · Pull Request #10492 · PowerShell/PowerShell · GitHub

Add -Runspace parameter to all *-PSBreakpoint cmdlets - #10492

Merged
Aditya Patwardhan (adityapatwardhan) merged 11 commits into
PowerShell:masterfrom
KirkMunro:add-runspace-parameter-to-breakpoint-cmdlets
Jul 21, 2020
Merged

Add -Runspace parameter to all *-PSBreakpoint cmdlets#10492
Aditya Patwardhan (adityapatwardhan) merged 11 commits into
PowerShell:masterfrom
KirkMunro:add-runspace-parameter-to-breakpoint-cmdlets

Conversation

Kirk Munro (KirkMunro) commented Sep 6, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

PR Summary

  • Adds an experimental -Runspace parameter Get-PSBreakpoint, Set-PSBreakpoint, Enable-PSBreakpoint, Disable-PSBreakpoint, and Remove-PSBreakpoint. This parameter is added to the "Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace" experimental flag that was added in PR Add APIs for breakpoint management in runspaces and enable attach to process without BreakAll for PSES #10338.
  • Refactors the classes behind the *-PSBreakpoint cmdlets so that they all work consistently. This refactoring did not change the behavior of these cmdlets beyond adding support for runspace breakpoint management, with one exception:
    • Changed the default parameter set for Enable-PSBreakpoint so that it is more performant when passed in breakpoints via a pipeline. The previous configuration for this cmdlet would always result in the "Id" parameter set being used, even when you pipe in a breakpoint. This change does not impact the functionality of the cmdlet -- it still accepts pipeline input and command line input with named or unnamed parameters the same way. The only visible impact is that this cmdlet will prompt users for a breakpoint instead of an ID now. See Issue Parameter binding pipeline input, and how the default parameter set influences that behavior #10188 for a discussion related to this.

PR Context

Now that the SDK has been enhanced to support breakpoint management in runspaces (see PR #10338), this PR builds on that work, exposing a common -Runspace parameter in all *-PSBreakpoint cmdlets so that users can use the same cmdlets to manage breakpoints in their local session or in a remote runspace.

PR Checklist

Copy link
Copy Markdown
Collaborator

Kirk Munro (@KirkMunro) At first look there is a lot of style changes in the PR. Could you please move them in another PR? It would be nice for code review.

Copy link
Copy Markdown
Contributor Author

Kirk Munro (@KirkMunro) At first look there is a lot of style changes in the PR. Could you please move them in another PR? It would be nice for code review.

Ilya (@iSazonov) I would rather not, unless I absolutely have to.

This PR was originally part of #10189, which they asked to be broken up into other PRs. After a side discussion between TylerLeonhardt, Paul Higinbotham (@PaulHigin) and Steve Lee (@SteveL-MSFT), they suggested this set of changes (adding the -Runspace parameter and refactoring under the base classes) as the second phase of the #10189 changes in an email.

The only real "style changes" are replacement of cmdlet parameter property/field pairs with just properties, using static strings where appropriate (for parameter set names), and adding regions to make the set of breakpoint cmdlet classes consistent with one another. They were made while setting up base classes for the breakpoint cmdlets, which makes the code much easier to maintain going forward. I don't think they should really get in the way of this code review.

Copy link
Copy Markdown
Collaborator

Kirk Munro (@KirkMunro) I only want to speed up a code review of the PR. It is possible for reviewer to check up to 500 lines of code at a time. The PR has over 1000 changes. Also style changes distract and slows down code review too.

Kirk Munro (KirkMunro) commented Sep 6, 2019
edited
Loading

Copy link
Copy Markdown
Contributor Author

Also style changes distract and slows down code review too.

The end result of the refactoring is leaner, consistent, better defined, DRY code that is easier to work with and maintain going forward. In this case, I don't believe separating some of the changes out into a separate PR buys us anything except for more work all around.

Copy link
Copy Markdown
Member

Paul Higinbotham (@PaulHigin) Can you have a look at this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am not sure if this is the right direction to take for managing breakpoints in arbitrary runspaces. This has pretty big impact and so I feel there should be a formal design and sign-off before implementation. I'll add a committee review tag to get their opinion.

ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 12, 2019
Paul Higinbotham (PaulHigin) added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Sep 12, 2019
ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 12, 2019
Travis Plunk (TravisEz13) added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 16, 2019
Andrew (anmenaga) removed the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Sep 17, 2019
ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 25, 2019
Travis Plunk (TravisEz13) removed this from the 7.1.0-preview.4 milestone May 22, 2020
ghost added the Stale label Jun 6, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

ghost removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Jun 13, 2020

Copy link
Copy Markdown
Contributor Author

Aditya Patwardhan (@adityapatwardhan) and Paul Higinbotham (@PaulHigin): I have merged in master and resolved all conflicts.

The single Codacy issue is incorrect, suggesting I should make a method static that cannot be made static. The PowerShell-CI-macos failures seem to have nothing to do with this PR.

I have also manually re-reviewed the code changes to ensure that nothing unexpected came from the merge.

From my perspective, this PR is good to go.

Copy link
Copy Markdown
Member

Paul Higinbotham (@PaulHigin) Please re-review the PR. Kirk Munro (@KirkMunro) Thanks for the updates

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Collaborator

Kirk Munro (@KirkMunro) Please open new issue in PowerShell-Docs repository.

ghost added the Review - Needed The PR is being reviewed label Jun 24, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov): Docs issue filed, and this PR has been updated with the link at the top, so it should be good to go.

Copy link
Copy Markdown
Member

Kirk Munro (@KirkMunro) Please resolve the merge conflict.

ghost removed the Review - Needed The PR is being reviewed label Jul 13, 2020

Copy link
Copy Markdown
Contributor Author

Aditya Patwardhan (adityapatwardhan) added this to the 7.1.0-preview.7 milestone Jul 21, 2020
Aditya Patwardhan (adityapatwardhan) merged commit 4729433 into PowerShell:master Jul 21, 2020

Copy link
Copy Markdown
Member

Kirk Munro (@KirkMunro) Thank you for your contribution and your patience!

Copy link
Copy Markdown

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Experimental Indicates that a PR should be marked as an Experimental Feature in the Change Log Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL