-
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
Use Roslyn interceptors feature in binder gen #90340
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsFixes #89322. Work left
|
d1d8513
to
1327ed9
Compare
7e0ce7c
to
4c4022c
Compare
88cb774
to
d205853
Compare
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/SourceGenerationSpec.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
Outdated
Show resolved
Hide resolved
d205853
to
f5d0e0e
Compare
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | ||
file sealed class InterceptsLocationAttribute : Attribute | ||
{ | ||
public InterceptsLocationAttribute(string filePath, int line, int column) |
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.
Did we want to add something like https://github.com/dotnet/sdk/blob/4249701de6f005c670c7f371141e772d02f89156/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.ProjectSystem.targets#L64 to our NuGet package targets, or will we ask users to set this? @eerhardt @tarekgh @captainsafia
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 think we decided to mimic whatever the aspnet is doing in the web project.
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.
ASP.NET doesn't ship a nuget package so we're special here. There's an ongoing discussion around this to decide what we want to do.
...aries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
...es/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Suppressor.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
Outdated
Show resolved
Hide resolved
...sions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.cs
Outdated
Show resolved
Hide resolved
80df566
to
743f89a
Compare
743f89a
to
f3fe768
Compare
4303ea5
to
d8aa6d9
Compare
Closing notesName clashes Not needed for this feature to work & there's no new risk added here. I'll address in #86363. I've reverted the changes to the options generator and left out unique name generation in this generator. Testing There's always room to improve coverage, but I believe these suffice for merging this PR.
|
/backport to release/8.0-rc1 |
Started backporting to release/8.0-rc1: https://github.com/dotnet/runtime/actions/runs/5907490321 |
Test failures seem to be caused by applying the code analysis version update across all projects. Will fix. |
b267af5
to
5210070
Compare
5210070
to
d9504fd
Compare
d9504fd
to
6fff866
Compare
Fixes #89322.