Skip to content
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

Consider using the preview Interceptors feature instead of post-build patching for IIDOptimizer #1420

Open
jkoritzinsky opened this issue Dec 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jkoritzinsky
Copy link
Member

Today, calls to GuidGenerator.GetIID are optimized into constant or partially pre-calculated values after compilation with IL editing. The C# compiler has an experimental feature to intercept calls by callsite and replace them with calls to other methods. This feature is in preview, but is used by various source generators for ASP.NET Core and Microsoft.Extensions projects. It may be worth moving IIDOptimizer to be a source-generator that emits the pre-calculated code to avoid getting into situations where it emits code that uses non-optimal patterns (#1340)

@jkoritzinsky jkoritzinsky added the bug Something isn't working label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant