Uh oh!
There was an error while loading. Please reload this page.
Fix: Config binder generator doesn't generate code when named arguments are out of order - #91961
Conversation
ghost
commented
Sep 12, 2023
Tagging subscribers to this area: @dotnet/area-system-configuration Issue DetailsConfig binder generator doesn't generate code when named arguments are out of order like in: internalvoidConfigure(IConfigurationconfiguration)=>ConfigurationBinder.Bind(instance:this,configuration:configuration);The issue also happens for ConfigurationBinder.Get(...) overloads. Fixes #90908
|
Uh oh!
There was an error while loading. Please reload this page.
layomia
commented
Sep 13, 2023
I believe it applies to all the extensions methods -- so in addition to |
Uh oh!
There was an error while loading. Please reload this page.
buyaa-n
commented
Sep 13, 2023
Did not found any indexed access of arguments in those files, only |
layomia
commented
Sep 14, 2023
Per offline discussion, we do need a fix/tests for these as well, e.g. usingSystem;usingMicrosoft.Extensions.Configuration;usingMicrosoft.Extensions.DependencyInjection;publicclassProgram{publicstaticvoidMain(){ServiceCollectionservices=new();IConfigurationconfiguration=newConfigurationBuilder().Build();services.Configure<string>(name:"string",configureBinder:null,config:configuration);}} |
Uh oh!
There was an error while loading. Please reload this page.
@layomia I have been testing similar code to see if I can repro it, but encountering errors similar to #91258 even though I am using latest |
ghost
commented
Sep 15, 2023
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue DetailsConfig binder generator doesn't generate code when named arguments are out of order like in: internalvoidConfigure(IConfigurationconfiguration)=>ConfigurationBinder.Bind(instance:this,configuration:configuration);The issue also happens for ConfigurationBinder.Get(...) overloads. Fixes #90908
|
layomia
commented
Sep 15, 2023
That's odd. Checking that out. In the meantime, you can verify your fix by adding unit tests like the ones you add for |
buyaa-n
commented
Sep 15, 2023
Yes, of course that is the plan, just wanted to let you know about these errors as it might be important. |
…, add test for OptionsBuilder... and ServiceCollection extensins
buyaa-n
commented
Sep 15, 2023
Added unit tests for those, there were no need a code fix for those extension methods |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
buyaa-n
commented
Sep 19, 2023
One CI build not finishes even running for more than 3.5hrs, going to merge |
buyaa-n
commented
Sep 19, 2023
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6229413419 |
Config binder generator doesn't generate code when named arguments are out of order like in:
The issue also happens for ConfigurationBinder.Get(...) overloads.
Fixes#90908