Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Progress Preference variable in adv functions#24591

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
daxian-dbw merged 7 commits intoPowerShell:masterfromcmkb3:ProgressPreference_Fix
Jun 3, 2025

Conversation

@cmkb3
Copy link
Contributor

PR Summary

!Resubmission

This fixes an array out of bounds/type error that occurs when using the -ProgressAction common parameter in advanced functions. The reference variable and variable type arrays are missing the ProgressPreference entry which causes various engine errors including index out of bounds and invalid typecast from index collision.

PR Context

Fixes:#21074 'The -ProgressAction parameter doesn't work (PowerShell 7.4.1 only)'
Fixes:#20657 'The new -ProgressAction common parameter breaks calls to advanced scripts and functions. '

PR Checklist

0xfeeddeadbeef reacted with thumbs up emoji
@cmkb3
Copy link
ContributorAuthor

@iSazonov -- Resubmitted, included changes to test names as requested
@jborean93 -- Resubmitted; thanks for generating the initial tests and guiding me through my Git mess 🙃

jborean93 reacted with hooray emoji

@iSazonoviSazonov added the CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log labelNov 15, 2024
@iSazonoviSazonov added the WG-Engine-Performancecore PowerShell engine, interpreter, and runtime performance labelNov 15, 2024
@iSazonov
Copy link
Collaborator

Request for Engine-Performance group. The PR updates code with performance optimizations. Please make conclusion about performance risks in some (maybe edge) scenarios.

@iSazonoviSazonov changed the titleFix Progress Preference handling, add tests/assertFix Progress Preference variable in adv functionsNov 15, 2024
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelNov 23, 2024
@RylandDeGregory
Copy link

When should we expect this to be merged? It’s been an open PR for 4 months now…

StewartRyanSony reacted with thumbs up emoji

@SeeminglyScienceSeeminglyScience added the WG-NeedsReviewNeeds a review by the labeled Working Group labelMay 21, 2025
@daxian-dbwdaxian-dbw self-assigned thisMay 23, 2025
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Review - NeededThe PR is being reviewed labelMay 23, 2025
@daxian-dbwdaxian-dbw moved this fromPR Todo toPR In Progress inPowerShell Team Reviews/InvestigationsMay 23, 2025
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelMay 30, 2025
@daxian-dbw
Copy link
Member

daxian-dbw commentedJun 3, 2025
edited
Loading

@cmkb3 Sorry it took so long to review this PR!

The fix looks good, but I pushed a commit for 2 minor changes:

  1. Move the assertions to the static constructor ofCompiler. This is whereAutomaticVariableTypes andPreferenceVariableTypes get used, and more importantly, this code path will always be hit, so if they are out of sync, we will know immediately.
  2. Update the tests a little -- a)$ps is created before eachIt test and disposed afterwards, so the newly added tests should not create new PowerShell instances. b) also add a parameter in the 2nd test case.
jborean93 and cmkb3 reacted with heart emoji

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Review - NeededThe PR is being reviewed labelJun 3, 2025
Copy link
Collaborator

@SeeminglyScienceSeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

RylandDeGregory reacted with hooray emoji
@daxian-dbwdaxian-dbw merged commitb502098 intoPowerShell:masterJun 3, 2025
34 checks passed
@daxian-dbwdaxian-dbw removed WG-Engine-Performancecore PowerShell engine, interpreter, and runtime performance WG-NeedsReviewNeeds a review by the labeled Working Group labelsJun 3, 2025
@jborean93
Copy link
Collaborator

Thanks for reviewing and merging this bugfix. Hopefully we can have it backported as well!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iSazonoviSazonoviSazonov approved these changes

@SeeminglyScienceSeeminglyScienceSeeminglyScience approved these changes

@daxian-dbwdaxian-dbwAwaiting requested review from daxian-dbwdaxian-dbw is a code owner

@SteveL-MSFTSteveL-MSFTAwaiting requested review from SteveL-MSFT

Assignees

@daxian-dbwdaxian-dbw

Labels

CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

Milestone

No milestone

6 participants

@cmkb3@iSazonov@RylandDeGregory@daxian-dbw@jborean93@SeeminglyScience

[8]ページ先頭

©2009-2025 Movatter.jp