-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add feature switch to control XmlResolver.IsNetworkingEnabledByDefault #34412
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Apply suggestions from code review
- Loading branch information
commit 6d19d39b58047813c06f1916095a51d8f823acc8
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
The STJ property controlling the
System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault
swich was namedJsonSerializerIsReflectionEnabledByDefault
. Echoing that naming convention, shouldn't this also be namedXmlResolverIsNetworkingEnabledByDefault
?Typically this needs to go through API review but maybe we can fast-track this. cc @eerhardt @bartonjs @terrajobst
Uh oh!
There was an error while loading. Please reload this page.
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.
We've not done API review on these or they would be consistent.
The
XXXSupport
is a prevalent theme for things that disable support for somethingDebuggerSupport
,EventSourceSupport
,HttpActivityPropagationSupport
,MetadataUpdaterSupport
,NullabilityInfoContextSupport
,CustomResourceTypesSupport
,DynamicCodeSupport
,BuiltInComInteropSupport
,...(The Json one is the odd one out)
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.
One difference between the existing XXXSupoort flags and the JsonSerializerIsReflectionEnabledByDefault flag is that the XXXSupport flags completely remove the ability for doing XXX. Where the JsonSerializer is still capable of doing reflection, it just won’t do it by default when the flag is set. Thus the verbose naming (it’s trying to be correct/precise).
I don’t know exactly which case the new XML flag falls into, but if the XmlResolver can still use networking even if the flag is set, I wouldn’t name it XXXSupport. Because it can still do it, even though the flag is set.
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.
@jozkee @krwq do you know which side
IsNetworkingEnabledByDefault
is on so we can finalize the name?Uh oh!
There was an error while loading. Please reload this page.
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'm not familiar with the code, but looking at this change suggests that it falls on the same boat as the STJ switch. It picks the
XmlUrlResolver
implementation if the switch is turned on, which is a public class. The behavior ofXmlUrlResolver
itself doesn't seem to be affected by the feature switch.The choice of name for the feature switch also suggests similarity with the STJ one, so we might want to emulate naming convention for the property as well.
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.
@eiriktsarpalis @eerhardt if this updated name looks good, could you please merge? I'm off work through end of August. It would be nice to have this in 8.0.
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!