-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Set default native arg passing to Legacy on Windows. #18706
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
Set default native arg passing to Legacy on Windows. #18706
Conversation
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use PSVersionInfo.PSCurrentVersion.PreReleaseLabel to detect whether it's a stable version.
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes stable and preview releases have different default behavior on native argument passing. Won't that inconsistency cause any problems and confusions to the preview adopters? If we choose to do this on purpose, then doc needs to be updated to reflect this inconsistency.
test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@daxian-dbw the difference between stable and preview is deliberate as to prioritize compat for stable while ensuring we have the new desired behavior in preview to continue to get feedback. Maybe an option we can take here to make this more clear is to wrap it in a new Experimental Feature. Specifically, |
|
I understand there will be difference between stable and preview versions. However, the native arg passing feature is already official, so making an official feature behave differently seems confusing. Introducing a new experimental feature for the different arg passing behavior in preview versions sounds like a good idea. A doc issue needs to be opened for the new experimental feature. |
|
@daxian-dbw We should probably advertise that |
4788f33 to
11e8a6b
Compare
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
11e8a6b to
647eabe
Compare
|
@PowerShell/powershell-committee Please review this PR and decide whether this PR should be closed or accepted. |
|
@PowerShell/powershell-committee discussed this. We agreed to a new
When this feature is disabled:
Additionally, new telemetry metric will be added for native command execution to inform the mode being used. |
647eabe to
4e1f2d5
Compare
5038016 to
8d88665
Compare
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If the PS release is a preview, then set it to Windows.
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
use compile time rather than runtime check Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
29c58b1 to
b37a98b
Compare
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
|
So the default behavior in 7.2 is Legacy, then in 7.3 it's Windows, now it's going to be Legacy in 7.4 unless an experimental feature is enabled which makes it into Windows by default unless you set a new variable to Legacy, do I have that right? |
|
@ImportTaste, this is marked to backport to 7.3. |
|
@PowerShell/powershell-committee Are we okay with making this change to 7.3 after it has been release? |
|
PS-Committee decided to make this feature stable in 7.4, so the default will be |
What's the difference between |
PR Summary
The committee agreed to a new
PSWindowsNativeCommandArgPassingexperimental feature. When this feature is enabled:$PSNativeCommandArgumentPassing=Windows$PSNativeCommandArgumentPassing=StandardWhen this feature is disabled:
$PSNativeCommandArgumentPassing=Legacy$PSNativeCommandArgumentPassing=StandardAdditionally, new telemetry metric will be added for native command execution to inform the mode being used.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).