Fix ref files from System.IO.Compression and System.IO.Compression.Brotli with autogenerated file using GenAPI#112440
Fix ref files from System.IO.Compression and System.IO.Compression.Brotli with autogenerated file using GenAPI#112440carlossanlop merged 9 commits intodotnet:mainfrom carlossanlop:CompressionRefs
Conversation
|
Note regarding the |
|
Note regarding the |
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
| 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.
This will be a source-breaking change. Can we double check which is intended here?
There was a problem hiding this comment.
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.
I was just about to paste this, you're fast. Yes, the src is wrong.
There was a problem hiding this comment.
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.
Seems like this was intentionally omitted
Perhaps you can configure GenAPI so that it will exclude it?
There was a problem hiding this comment.
Let me understand how it works first.
There was a problem hiding this comment.
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.
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.
Ah thanks. I think I should do it in this PR.
There was a problem hiding this comment.
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. | |||
|
/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: