Skip to content

Commit

Permalink
Restore CompatibilitySuppressions.xml? Why?
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Dec 5, 2024
1 parent 61c0274 commit c7ea07e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Lombiq.Privacy.Tests.UI/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:Lombiq.Privacy.Tests.UI.Constants.TestUser</Target>
<Left>lib/net8.0/Lombiq.Privacy.Tests.UI.dll</Left>
<Right>lib/net8.0/Lombiq.Privacy.Tests.UI.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>

4 comments on commit c7ea07e

@sarahelsaig
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Piedone I'm publishing the major releases for OSOCE now. I've removed all these CompatibilitySuppressions.xml files from everywhere, but for some reason in Lombiq.Privacy I got this error:

error : API compatibility errors between 'lib/net8.0/Lombiq.Privacy.Tests.UI.dll' (/home/runner/.nuget/packages/lombiq.privacy.tests.ui/9.0.0/lombiq.privacy.tests.ui.9.0.0.nupkg) and 'lib/net8.0/Lombiq.Privacy.Tests.UI.dll' (/home/runner/work/Orchard-Privacy/Orchard-Privacy/artifacts/Lombiq.Privacy.Tests.UI.10.0.0.nupkg): [Privacy.Tests.UI.csproj]
error CP0001: Type 'Lombiq.Privacy.Tests.UI.Constants.TestUser' exists on [Baseline] lib/net8.0/Lombiq.Privacy.Tests.UI.dll but not on lib/net8.0/Lombiq.Privacy.Tests.UI.dll [Lombiq.Privacy.Tests.UI.csproj]
error : API breaking changes found. If those are intentional, the APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true' [Lombiq.Privacy.Tests.UI.csproj]

I thought compatibility checks are not needed when you publish a major release. Maybe it's different because here it's missing a type instead of a method. Is this a bug?
After restoring this file, NuGet publish succeeded. So I guess now it's safe to remove this file again, right?

@Piedone
Copy link
Member

@Piedone Piedone commented on c7ea07e Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a bug, yes, and why I created Lombiq/GitHub-Actions#350. I thought that fixed itself since then, but apparently, sometimes it trips still.

And yes, after that, you may remove the file, and actually also should, because any further push will fail package validation, telling that the suppressions are unnecessary.

@sarahelsaig
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, after that, you may remove the file, and actually also should

Good, because I've already removed it: 5933b73

@Piedone
Copy link
Member

@Piedone Piedone commented on c7ea07e Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Please sign in to comment.