-
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
Fix build break #99328
Fix build break #99328
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue Detailsnull
|
@@ -398,7 +398,7 @@ public static byte[] ReaderLoop(int inpuDataLength, out int length, ref Utf8Json | |||
ReadOnlySpan<byte> valueSpan = json.HasValueSequence ? json.ValueSequence.ToArray() : json.ValueSpan; | |||
if (json.HasValueSequence) | |||
{ | |||
Assert.True(json.ValueSpan == default); | |||
Assert.True(json.ValueSpan.IsEmpty); |
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 these tests wants to really test for default
. This build break should be fixed by pragma warning disable.
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.
Yeah that's my thinking too. I wanted to see if there are more breaks after these ones are fixed.
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.
Ah, the analyzer should be disabled for test projects, could you please add below rows here:
runtime/eng/CodeAnalysis.test.globalconfig
Lines 675 to 677 in b5b290f
# CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult> | |
dotnet_diagnostic.CA2261.severity = none | |
# CA2265: Do not compare Span<T> to 'null' or 'default'
dotnet_diagnostic.CA2265.severity = none
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 see the analyzer updated reverted, this can be added later when analyzer updated
There are still more build issues this PR does not address, like in
|
Draft PR because I'm not convinced this is the right fix.