-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve startup time for runtime EventSources #45105
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
f575a1d
to
1cab9f7
Compare
This should be done via source generator: #43390 |
Agreed; but someone needs to go first with the source generators (even a simple one) to link them into the build infra for System.Private.CoreLib will be easier to do it from there... |
I think this would a good candidate for first real source generator to use with dotnet/runtime. @danmosemsft @samsp-msft We have been talking quite a bit about source generators. We need to start figuring out how to build and use them in dotnet/runtime. Could you please suggest who should be driving this? I believe that it falls close to libraries infrastructure area. |
Have cherrypicked the "Optimise retrieving/checking a single Attribute (GetCustomAttribute)" commit and added it seperately #45121 |
@dotnet/runtime-infrastructure how we will develop and use source generators?
|
I don't have a strong preference regarding the location but I would avoid specifying |
We will want to use many of these source generators in CoreLib. It creates interesting build ordering issues. Would it make sense for the source generators to be its own partition? |
We also need to test them. @layomia has some experience with this. There's one take on it here: https://github.com/dotnet/runtimelab/tree/feature/JsonCodeGen/src/libraries/System.Text.Json
Today source-generators target We also need to think about how we ship them. I imagine we'll want to make some sort of transport package that can be consumed by either roslyn or the SDK in order to ship them with the SDK. |
We probably need an issue to track this source-generators-infra work. |
EventSourceGenerator for .ctor and metadata (but not manifest) #45699 |
// Auto-generated message 69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts. To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others. |
What infrastructure work are you imagining? I don't think we need anything too special since source-generators are .NETStandard libraries. I suspect we need folks to establish some guidelines and patterns/conventions about them so that they are implemented consistently. We may need to figure some of that out as we go. There will likely be a different pivot for source generators that actually ship as part of the product vs generators that are just used internally to dotnet/runtime. The former needs tests for the generator itself. Thoughts @jkotas @ViktorHofer @stephentoub? |
+1 . I think that the structure in #45699 is a good start. |
Yeah, those are the kinds of things I'd expect to figure out as we add them. |
Agreed. Just scanned the PR. The generator's source location and how it is included to the build makes sense to me. |
Draft Pull Request was automatically closed for inactivity. It can be manually reopened in the next 30 days if the work resumes. |
ReadOnlySpan<byte>
)ReadOnlySpan<byte>
)MemberInfo
(e.g.Type
) andMethodInfo
Contributes to #44598
Reduces impact of #45059