Skip to content

Restore the PowerShellStreamType enum with an ObsoleteAttribute #11836

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

Merged
merged 2 commits into from
Feb 12, 2020

Conversation

rjmholt
Copy link
Collaborator

@rjmholt rjmholt commented Feb 12, 2020

PR Summary

Fixes #11619.

PR Context

Returns the PowerShellStreamType enum to code, since it was public, generically named and removed. Adds an ObsoleteAttribute to prevent new usage.

@rjmholt
Copy link
Collaborator Author

rjmholt commented Feb 12, 2020

CodeFactor issues are due to reusing previous documentation comments

@TravisEz13 TravisEz13 modified the milestones: 7.0-Consider, GA-consider Feb 12, 2020
@TravisEz13 TravisEz13 added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Feb 12, 2020
/// It is not used by any other PowerShell API, and is now obsolete
/// and should not be used if possible.
/// </remarks>
[Obsolete("Formerly used in PowerShell Workflow. Use an integer or System.Management.Automation.Language.RedirectionStream instead.")]
Copy link
Member

@daxian-dbw daxian-dbw Feb 12, 2020

Choose a reason for hiding this comment

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

Use an integer or System.Management.Automation.Language.RedirectionStream instead.

@TravisEz13 and I discussed on this message, and we think it's better to not give a workaround here given that those 2 enums have different members and values.

How about change the message to This enum type was used only in PowerShell Workflow and is now obsolete.
And make sure specify true for the error parameter.

Copy link
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

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

make sure specify true for the error parameter.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Feb 12, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Feb 12, 2020
@adityapatwardhan adityapatwardhan merged commit 2cfe8a4 into PowerShell:master Feb 12, 2020
@TravisEz13 TravisEz13 modified the milestones: GA-consider, 7.0.0 Feb 12, 2020
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Feb 18, 2020
@ghost
Copy link

ghost commented Feb 21, 2020

🎉v7.0.0-rc.3 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Engine Indicates that a PR should be marked as an engine change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public APIs missing in PowerShell 7.0.0-rc.2 since 6.2.3
5 participants