-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Make various types public as they were already visible externally #8741
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
Make various types public as they were already visible externally #8741
Conversation
iSazonov
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.
For new public APIs we need PowerShell Committee approval.
src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommonCommandParameters.cs
Outdated
Show resolved
Hide resolved
|
What is the motivation for making these types public? For example, I believe |
Fix CodeFactor issues
50b5669 to
3a3fb7c
Compare
JamesWTruher
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.
I don't enough context to suggest that there are any problems with this
|
I'm not totally sure I understand the motivation - maybe an upcoming change in the CLR? I haven't reviewed the changes closely, but after a quick glance, if a CLR change forces these types to be public, I'd move them to an |
|
I see. I'm assuming that custom attributes are always included in the reference assembly just in case a build tool like the C# compiler needs to see the attribute to generate correct code or check for errors. I'm not aware of any build tool that needs to see PowerShell's attributes, so I would expect careful thought before blindly making these types public. Many of the names are not good public apis - they maybe sound too general, e.g.
I wonder if |
Having public methods doesn't seem to be a strong argument to make them public. We have other internal types with |
|
If GenAPI doesn't work because the types is visible externally it is GenAPI problem and it would be fixed in GenAPI. Or we could create a workaround on PowerShell to resolve the problem. |
|
I will shortly add a gist of the |
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
|
This PR has been automatically closed because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it. |
PR Summary
Many types were already visible publicly either as attributes or as OutputType. This change marks them as public.
ValidateVariableNameAttribute- is used by a public propertyCommonParameters.ErrorVariableArgumentToVersionTransformationAttribute- is used by a public propertySetStrictModeCommand.VersionValidateVersionAttribute- is used by a public propertySetStrictModeCommand.VersionEnumSingleTypeConverterandEnumMultipleTypeConverter- classes had public methodsArgumentToModuleTransformationAttribute- used bySave-Helpcommand forModuleparameter.ArgumentToEncodingTransformationAttribute- used by multiple cmdlets forEncodingparameter.Also, changed the output type of
Start-JobfromPSRemotingJobtoJobPR 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.[feature]to your commit messages if the change is significant or affects feature tests