Skip to content

arm64: Rename ConditionalExtract arguments #116216

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

Conversation

jonathandavies-arm
Copy link
Contributor

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 2, 2025
@jonathandavies-arm
Copy link
Contributor Author

@a74nh @kunalspathak @dotnet/arm64-contrib

@kunalspathak
Copy link
Member

It seems we need to fix the entries inside CompatibilitySuppressions.

@kunalspathak kunalspathak added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jun 2, 2025
@a74nh
Copy link
Contributor

a74nh commented Jun 3, 2025

It seems we need to fix the entries inside CompatibilitySuppressions.

This error:

2025-06-02T12:15:17.4287735Z /__w/1/s/.packages/microsoft.dotnet.apicompat.task/10.0.100-preview.5.25260.104/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : API compatibility errors between 'ref/net10.0/System.Private.CoreLib.dll' (left) and 'lib/net10.0/System.Private.CoreLib.dll' (right): [/__w/1/s/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
2025-06-02T12:15:17.4360397Z ##[error].packages/microsoft.dotnet.apicompat.task/10.0.100-preview.5.25260.104/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) API compatibility errors between 'ref/net10.0/System.Private.CoreLib.dll' (left) and 'lib/net10.0/System.Private.CoreLib.dll' (right):
2025-06-02T12:15:17.4367181Z /__w/1/s/.packages/microsoft.dotnet.apicompat.task/10.0.100-preview.5.25260.104/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error CP0017: Parameter name on member 'System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector<byte>, byte, System.Numerics.Vector<byte>)' changed from 'defaultValues' to 'defaultValue'. [/__w/1/s/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
2025-06-02T12:15:17.4369597Z ##[error].packages/microsoft.dotnet.apicompat.task/10.0.100-preview.5.25260.104/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error CP0017: (NETCORE_ENGINEERING_TELEMETRY=Build) Parameter name on member 'System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector<byte>, byte, System.Numerics.Vector<byte>)' changed from 'defaultValues' to 'defaultValue'.

Feels like it should be suppressed by:

  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Byte},System.Byte,System.Numerics.Vector{System.Byte})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>

Unless there needs to be something extra added for the argument rename?

@jonathandavies-arm
Copy link
Contributor Author

It seems we need to fix the entries inside CompatibilitySuppressions.

When I run the build with /p:ApiCompatGenerateSuppressionFile=true it does produce this file at src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml

<?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:Internal.Console</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0002</DiagnosticId>
    <Target>F:System.Resources.ResourceManager.BaseNameField</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0002</DiagnosticId>
    <Target>F:System.Resources.ResourceSet.Reader</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0002</DiagnosticId>
    <Target>M:System.String.Trim(System.ReadOnlySpan{System.Char})</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0002</DiagnosticId>
    <Target>M:System.String.TrimEnd(System.ReadOnlySpan{System.Char})</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0002</DiagnosticId>
    <Target>M:System.String.TrimStart(System.ReadOnlySpan{System.Char})</Target>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Byte},System.Byte,System.Numerics.Vector{System.Byte})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Double},System.Double,System.Numerics.Vector{System.Double})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Int16},System.Int16,System.Numerics.Vector{System.Int16})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Int32},System.Int32,System.Numerics.Vector{System.Int32})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Int64},System.Int64,System.Numerics.Vector{System.Int64})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.SByte},System.SByte,System.Numerics.Vector{System.SByte})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.Single},System.Single,System.Numerics.Vector{System.Single})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.UInt16},System.UInt16,System.Numerics.Vector{System.UInt16})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.UInt32},System.UInt32,System.Numerics.Vector{System.UInt32})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElement(System.Numerics.Vector{System.UInt64},System.UInt64,System.Numerics.Vector{System.UInt64})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Byte},System.Numerics.Vector{System.Byte},System.Numerics.Vector{System.Byte})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Double},System.Numerics.Vector{System.Double},System.Numerics.Vector{System.Double})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Int16},System.Numerics.Vector{System.Int16},System.Numerics.Vector{System.Int16})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Int32},System.Numerics.Vector{System.Int32},System.Numerics.Vector{System.Int32})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Int64},System.Numerics.Vector{System.Int64},System.Numerics.Vector{System.Int64})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.SByte},System.Numerics.Vector{System.SByte},System.Numerics.Vector{System.SByte})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.Single},System.Numerics.Vector{System.Single},System.Numerics.Vector{System.Single})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.UInt16},System.Numerics.Vector{System.UInt16},System.Numerics.Vector{System.UInt16})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.UInt32},System.Numerics.Vector{System.UInt32},System.Numerics.Vector{System.UInt32})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
  <Suppression>
    <DiagnosticId>CP0017</DiagnosticId>
    <Target>M:System.Runtime.Intrinsics.Arm.Sve.ConditionalExtractLastActiveElementAndReplicate(System.Numerics.Vector{System.UInt64},System.Numerics.Vector{System.UInt64},System.Numerics.Vector{System.UInt64})$1</Target>
    <Left>ref/net10.0/System.Private.CoreLib.dll</Left>
    <Right>lib/net10.0/System.Private.CoreLib.dll</Right>
  </Suppression>
</Suppressions>

@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jun 3, 2025
@kunalspathak
Copy link
Member

When I run the build with /p:ApiCompatGenerateSuppressionFile=true it does produce this file at src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml

May be that could be it. Or I was hoping to see some changes in https://github.com/dotnet/runtime/blob/main/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml, just as what we saw in #115609

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

can you try to use the file ApiCompatBaseline.NetCoreAppLatestStable.xml, that we earlier updated?

@@ -1,6 +1,10 @@
<?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>
Copy link
Member

Choose a reason for hiding this comment

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

also, updating the file under nativeaot feels little odd too.

@jonathandavies-arm
Copy link
Contributor Author

jonathandavies-arm commented Jun 4, 2025

can you try to use the file ApiCompatBaseline.NetCoreAppLatestStable.xml, that we earlier updated?

If I manually add suppressions to src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml for the API changes the build should pass. But when someone next runs a build with /p:ApiCompatGenerateSuppressionFile=true it will remove my manual changes.

@a74nh
Copy link
Contributor

a74nh commented Jun 4, 2025

can you try to use the file ApiCompatBaseline.NetCoreAppLatestStable.xml, that we earlier updated?

If I manually add suppressions to src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml for the API changes the build should pass. But when someone next runs a build with /p:ApiCompatGenerateSuppressionFile=true it will remove my manual changes.

This is a little odd.

When I build this PR with /p:ApiCompatGenerateSuppressionFile=true it does not update NetCoreAppLatestStable.xml.

In #115609 the function names were being changed. But in this PR it's only the argument names. I think that the scripts run when doing the build are not able to spot when only the arguments change.

If Jonathan is manually editing NetCoreAppLatestStable.xml then it makes sense that running with /p:ApiCompatGenerateSuppressionFile=true then those changes are getting removed.

What scripts are used that edit NetCoreAppLatestStable.xml?

@kunalspathak
Copy link
Member

What scripts are used that edit NetCoreAppLatestStable.xml?

@tannergooding - do you know?

@tannergooding
Copy link
Member

The general instructions for updating APICompat are here: https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/README.md#apicompat

I don't recall which projects impact which compat files, the tooling should just generally do the right thing.

@kunalspathak
Copy link
Member

When I run the build with /p:ApiCompatGenerateSuppressionFile=true it does produce this file at src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml

i think that could be the right way, at least the right file is touched with this and not from nativeaot folder.

@a74nh a74nh mentioned this pull request Jun 9, 2025
16 tasks
@kunalspathak kunalspathak added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Jun 10, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Jun 10, 2025
Copy link
Contributor

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@kunalspathak
Copy link
Member

Tagging @dotnet/compat for awareness of the breaking change.

Since this is [Experimental] feature, I will remove the breaking-change label.

@kunalspathak kunalspathak removed breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labels Jun 10, 2025
Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM

@kunalspathak kunalspathak merged commit 3d31072 into dotnet:main Jun 10, 2025
146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.Intrinsics community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arm64 SVE: Rename arguments for SVE ConditionalExtract APIs
4 participants