-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Filter out compiler generated types for Add-Type -PassThru
#18095
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
Conversation
@SeeminglyScience Can you please take a look and see if this will cause any problem to VSCode Extension? |
I think all is good on the VSCode side 🎉 Though, I can imagine someone generating p/invokes as internal and doing Would definitely be slower, but maybe worth considering looking for |
Looks like a bug. Why should we hide it? The fix looks like very sensitive breaking change in the cmdlet. |
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
Roslyn has always created private helper types in certain conditions, typically for performance reasons. I don't think they would consider this change breaking, they expect all tooling that reads types to ignore anything decorated with |
Maybe they lost the attribute for member we see? :-) And your comment raises the same question - why should we hide if they don't? |
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) |
I like this👍 |
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! ❤️
Nope, nothing is hidden. It's an improvement to the emitted code.
I have updated the PR description to say it's an improvement, instead of a breaking change :) |
Add-Type -PassThru
Add-Type -PassThru
/backport to release/v7.3.0-rc.1 |
🎉 Handy links: |
PR Summary
Only return types that are not auto-generated by compiler with
Add-Type -PassThru
.An improvement was made to
Microsoft.CodeAnalysis.CSharp
to allow compiler to generate private helper class sometimes for performance reason (see an example below). Passing through all types from the assembly cause one of our tests to fail:https://dev.azure.com/powershell/PowerShell/_build/results?buildId=108821&view=logs&j=77295986-da6b-5a15-d60e-dfb16acd57ef&t=a58f8c58-10a4-5f19-f6fe-df1d6acdd5db&l=685
This PR makes
-PassThru
to only return types that are not compiler generated. It's technically a breaking change, but should be in "Bucket 3 - gray area".PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.