Skip to content
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

GenerateReferenceAssemblySource does not respect the CompatibilitSuppressions.xml #112451

Closed
carlossanlop opened this issue Feb 11, 2025 · 4 comments

Comments

@carlossanlop
Copy link
Member

As asked here: #112440 (comment)

When I ran the commands from this guide:

cd src/libraries/System.IO.Compression/src/
dotnet build /p:ApiCompatValidateAssemblies=false
dotnet msbuild /t:GenerateReferenceAssemblySource

A ZLibException was unexpectedly added to the ref file, even though it's explicitly excluded in the CompatibilitySuppressions.xml file of System.IO.Compression.

I do not know if the GenAPI Task is currently configured to know how to locate any CompatibilitySuppressions.xml file and determine which APIs to skip. But since the addition to the ref was unexpected, we should look into this.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Feb 11, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@ericstj
Copy link
Member

ericstj commented Feb 12, 2025

The expectation is that they are different inputs. Here's an example of how to configure GenAPI to exclude those types

<GenAPIExcludeApiList>ReferenceAssemblyExclusions.txt</GenAPIExcludeApiList>

Might be nice if we had a single way to tell both tools not to look at the type, but redundancy here isn't necessarily a bad thing.

@carlossanlop
Copy link
Member Author

Ah yes, you're right, the CompatibilitySuppressions.xml does not have the format required by ApiCompat/GenAPI with a list of fullname DocIDs.

I'll do what Tensors is doing then. Thanks.

@carlossanlop
Copy link
Member Author

Fixed it in System.IO.Compression.csproj: https://github.com/dotnet/runtime/pull/112440/files#diff-a9e5b4d167cacb3259db3392fd54f9f1c8c96568e4c49e9e73fa99414079044f

Since this isn't really a bug, but a missing property in the csproj, I think this can be closed.

@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants