-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 ref files from System.IO.Compression and System.IO.Compression.Brotli with autogenerated file using GenAPI #112440
Conversation
Note regarding the
|
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
@@ -51,7 +51,7 @@ public override void SetLength(long value) { } | |||
public override void Write(byte[] buffer, int offset, int count) { } | |||
public override void Write(System.ReadOnlySpan<byte> buffer) { } | |||
public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } | |||
public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | |||
public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken) { throw null; } |
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.
This will be a source-breaking change. Can we double check which is intended here?
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.
Pretty sure this is a bug in the src rather than the ref. I see the base WriteAsync
has the default parameter https://github.com/dotnet/runtime/blob/4da708a7060d238354d79823e58839c1d92f7fd1/src/libraries/System.Runtime/ref/System.Runtime.cs#L10773
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 was just about to paste this, you're fast. Yes, the src is wrong.
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.
Fixed the ref.
src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.cs
Show resolved
Hide resolved
Fixed = 4 | ||
Fixed = 4, | ||
} | ||
public partial class ZLibException : System.IO.IOException, System.Runtime.Serialization.ISerializable |
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.
Seems like this was intentionally omitted
runtime/src/libraries/System.IO.Compression/src/CompatibilitySuppressions.xml
Lines 3 to 7 in 4da708a
<!-- Exposed publicly only in implementation for serialization compat. --> | |
<Suppression> | |
<DiagnosticId>CP0001</DiagnosticId> | |
<Target>T:System.IO.Compression.ZLibException</Target> | |
</Suppression> |
Perhaps you can configure GenAPI so that it will exclude it?
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.
Let me understand how it works first.
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'll open an issue to keep investigating later #112451
I'll jump to work on the m-p issue.
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 added a comment to #112451 (comment) with how to do this. Your call if you want to do it in this PR or not.
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 thanks. I think I should do it in this PR.
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.
Pushed the changes. Nice to see that after creating the txt file and adding that property to the csproj, the ZLibException is no longer getting auto-added to the ref cs when running the dotnet msbuild /t:GenerateReferenceAssemblySource
command.
… DeflateStream, remove unnecessary cast in ReadAsync.
@@ -1,115 +0,0 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
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.
Agree this looks accidental in dotnet/corefx#30364
/ba-g Timeouts/deadletters in Windows Server 2025 (known/pre-existing). |
I noticed the ref cs files from these two assemblies are not correctly updated with the latest automatically generated public surface. This might be an issue since before the GenAPI tool was created and this readme file was written: https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/updating-ref-source.md
I saw we have a discussion around hiding attributes: #66090 but I couldn't find a discussion around making sure all our ref files are correctly updated and generated using GenAPI (not manually).
I am also removing a couple of test files that were added by mistake many years ago probably to test some experimental features that were never merged. These test files are not among the Compile items in the csproj: