You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone the repo from the specified commit.
Running dotnet build on Linux fails with compatibility errors and Unnecessary suppressions found (the same suppressions found in the suppression file).
Run dotnet build /p:ApiCompatGenerateSuppressionFile=true on Linux. It will override CompatibilitySuppressions.xml changing all backslashes in the Right directives to forward slashes.
Running dotnet build on Windows fails with compatibility errors and Unnecessary suppressions found (the same ones in the generated suppression file).
It also fails if running with different configurations (Debug/Release), as the path will differ in the Right directive. Maybe that's intentional, even though the Left directive doesn't necessary say anything about the configuration used to compile the baseline.
Removing all the Right directives fixes the issue (it seems to be optional), but there doesn't seem to be anyway to configure ApiCompat to not generate the Right directive?
This is just our usage in runtime. The item include supports a regex pattern in which you can use to capture groups. The item's ReplacementString metadata is a regex replace pattern in which you can reference on the captured item groups.
Describe the bug
Generating a suppression file with ApiCompat generates different
Right
directives on Windows and Linux which isn't interchangeable.To Reproduce
Example project: https://github.com/Fresa/Kafka.Protocol/blob/b190d4eb98fb66f176925bf5b63c03d774980235/Kafka.Protocol/Kafka.Protocol.csproj
Suppression file generated through Visual Studio in Windows: https://github.com/Fresa/Kafka.Protocol/blob/b190d4eb98fb66f176925bf5b63c03d774980235/Kafka.Protocol/CompatibilitySuppressions.xml
Clone the repo from the specified commit.
Running
dotnet build
on Linux fails with compatibility errors and Unnecessary suppressions found (the same suppressions found in the suppression file).Run
dotnet build /p:ApiCompatGenerateSuppressionFile=true
on Linux. It will override CompatibilitySuppressions.xml changing all backslashes in theRight
directives to forward slashes.Running
dotnet build
on Windows fails with compatibility errors and Unnecessary suppressions found (the same ones in the generated suppression file).It also fails if running with different configurations (Debug/Release), as the path will differ in the
Right
directive. Maybe that's intentional, even though theLeft
directive doesn't necessary say anything about the configuration used to compile the baseline.Removing all the
Right
directives fixes the issue (it seems to be optional), but there doesn't seem to be anyway to configure ApiCompat to not generate theRight
directive?Further technical details
Ubuntu 22.04 (WSL)
.NET SDK:
Version: 8.0.404
Commit: 7b190310f2
Workload version: 8.0.400-manifests.589672c3
MSBuild version: 17.11.9+a69bbaaf5
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.404/
Windows 11
Microsoft Visual Studio Community 2022 (64-bit)
Version 17.12.0
.NET SDK:
Version: 9.0.100
Commit: 59db016
Workload version: 9.0.100-manifests.c6f19616
MSBuild version: 17.12.7+5b8665660
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100\
The text was updated successfully, but these errors were encountered: