-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Make src gen for property setters consistent with reflection #91899
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
Conversation
|
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue Detailsnull
|
f18c247 to
f7de98e
Compare
f7de98e to
a2318b1
Compare
|
@steveharter there are some failures that seem related to the change. Could you please have a look? |
...nder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt
Outdated
Show resolved
Hide resolved
...nfiguration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T.generated.txt
Show resolved
Hide resolved
...nder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt
Show resolved
Hide resolved
...ensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Collections.generated.txt
Outdated
Show resolved
Hide resolved
...guration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind.generated.txt
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs
Outdated
Show resolved
Hide resolved
layomia
left a comment
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.
Thanks!
|
Need to get in at least this before backport merge can be successful: #91717 |
|
/backport to release/8.0 |
|
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6191249484 |
|
@steveharter backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Make src gen for property setters consistent with reflection
.git/rebase-apply/patch:218: trailing whitespace.
Assert.Null(options.OtherCodeUri);
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
A src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs
A src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/SimpleTypeSpec.cs
M src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs
M src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs
Auto-merging src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs
Auto-merging src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParsableFromStringSpec.cs
Auto-merging src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/CoreBindingHelpers.cs
CONFLICT (content): Merge conflict in src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/CoreBindingHelpers.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Make src gen for property setters consistent with reflection
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@steveharter an error occurred while backporting to release/8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
|
/backport to release/8.0 |
|
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6204180109 |
Address #86333 (RC2 candidate as well)
boolarg to theBindCore()method.nullvalue or missing section for properties and if null\missing (this was not done in all cases previously) then don't call the setter with thenull. This addresses Config generator overwrites existing properties when provided with empty config section #91380.Note that this PR matches known semantics regarding the above with the goal of maintaining compat with reflection; this is the case even for non-intuitive cases including:
Nullable<T>.We could create an issue for these non-intuitive cases, but would need to consider the benefit:risk including breaking changes.