-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Do not emit unused fields in RDG source #48426
Do not emit unused fields in RDG source #48426
Conversation
Thanks for your PR, @martincostello. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Thanks @martincostello, this looks good and is well covered by our existing test cases. I'm approving, but also tagging @captainsafia just in case there is an issue I've missed. |
@martincostello @mitchdenny Apologies for the delay! I was trying to form a more coherent note of my feedback here. The gist of my reservations is that it feels rather strange for us to use a completely different strategy for emit for this static fields compared to what we have for the existing helper types and methods. Typically, we'd use the EmitterContext to set state for types/methods that need to be emitted as we render their invocations. It would be worthwhile to explore doing this instead of the mapping out the verbs in |
No problem - I wasn't sure on what the best way was, so went with an initial approach that wouldn't churn the code for the generator too much. If you can point me at roughly what you're referring to for the context and the pipeline I'll look at changing the approach once #48555 is merged as otherwise I think it'll be a massive merge conflict nightmare. |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
d056819
to
e4c1c32
Compare
e4c1c32
to
6ad9975
Compare
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
@martincostello this is looking good. Looking at the Helix test failures it looks like the baselines just need to be regenerated. |
6ad9975
to
35c7c8d
Compare
/app run |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
35c7c8d
to
cb0f236
Compare
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
Do not emit unused private fields for HTTP verbs that are not used by any of the user-code endpoints. Resolves dotnet#48381.
Use another incremental pipeline to produce the HTTP verbs.
Add custom comparer for endpoints by their HTTP method.
cb0f236
to
24f3b68
Compare
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.
🤩
Do not emit unused fields in RDG source
Elide private fields that are not used by emitted RDG code.
Description
Do not emit unused private fields for HTTP verbs that are not used by any of the user-code endpoints.
Fixes #48381.