Skip to content

Incorrect behaviour with API breaking changes on Amazon Linux 2 #8926

@bkhouri

Description

@bkhouri

#8857 added SwiftBUild support for diagnost-api-breaking-changes. However, there are a few expectation failures on AL2.

Search for this GitHub issue in the SwiftPM code base.

[2025-07-11T07:42:20.737Z] ✘ Test testCheckVendedModulesOnly(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:180:17: Expectation failed: (error.stdout → "").contains("💔 API breakage")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "💔 API breakage": Swift.String → "💔 API breakage"
[2025-07-11T07:42:20.737Z] ✔ Test case passing 2 arguments buildSystem → .native (SPMBuildCore.BuildSystemProvider.Kind), configuration → .release (PackageModel.BuildConfiguration) to traits_whenTraitUnification(buildSystem:configuration:) passed after 25.493 seconds.
[2025-07-11T07:42:20.737Z] ✘ Test testMultiTargetAPIDiff(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:119:17: Expectation failed: (error.stdout → "").contains("2 breaking changes detected in Qux")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "2 breaking changes detected in Qux": Swift.String → "2 breaking changes detected in Qux"
[2025-07-11T07:42:20.737Z] ✘ Test testMultiTargetAPIDiff(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:120:17: Expectation failed: (error.stdout → "").contains("💔 API breakage: class Qux has generic signature change from <T> to <T, U>")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "💔 API breakage: class Qux has generic signature change from <T> to <T, U>": Swift.String → "💔 API breakage: class Qux has generic signature change from <T> to <T, U>"
[2025-07-11T07:42:20.737Z] ✘ Test testMultiTargetAPIDiff(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:121:17: Expectation failed: (error.stdout → "").contains("💔 API breakage: var Qux.x has been removed")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "💔 API breakage: var Qux.x has been removed": Swift.String → "💔 API breakage: var Qux.x has been removed"
[2025-07-11T07:42:20.737Z] ✘ Test testMultiTargetAPIDiff(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:122:17: Expectation failed: (error.stdout → "").contains("1 breaking change detected in Baz")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "1 breaking change detected in Baz": Swift.String → "1 breaking change detected in Baz"
[2025-07-11T07:42:20.737Z] ✘ Test testMultiTargetAPIDiff(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:123:17: Expectation failed: (error.stdout → "").contains("💔 API breakage: func bar() has been removed")
[2025-07-11T07:42:20.737Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:20.737Z] ↳ "💔 API breakage: func bar() has been removed": Swift.String → "💔 API breakage: func bar() has been removed"
[2025-07-11T07:42:20.737Z] ✔ Test case passing 2 arguments buildSystem → .swiftbuild (SPMBuildCore.BuildSystemProvider.Kind), configuration → .debug (PackageModel.BuildConfiguration) to traits_whenAllTraitsEnabled_andDefaultTraitsDisabled(buildSystem:configuration:) passed after 25.532 seconds.
[2025-07-11T07:42:21.296Z] ✔ Test case passing 1 argument buildSystem → .native (SPMBuildCore.BuildSystemProvider.Kind) to testMultiTargetAPIDiff(buildSystem:) passed after 15.339 seconds.
[2025-07-11T07:42:21.296Z] ✘ Test case passing 1 argument buildSystem → .swiftbuild (SPMBuildCore.BuildSystemProvider.Kind) to testMultiTargetAPIDiff(buildSystem:) failed after 15.191 seconds with 5 issues.
[2025-07-11T07:42:21.296Z] ✘ Test testCheckVendedModulesOnly(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:182:17: Expectation failed: (error.stdout → "").contains(regex → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program))
[2025-07-11T07:42:21.296Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:21.296Z] ↳ regex: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput> → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program)
[2025-07-11T07:42:21.296Z] ✘ Test testCheckVendedModulesOnly(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:183:17: Expectation failed: (error.stdout → "").contains(regex → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program))
[2025-07-11T07:42:21.296Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:21.296Z] ↳ regex: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput> → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program)
[2025-07-11T07:42:21.296Z] ✘ Test testCheckVendedModulesOnly(buildSystem:) recorded an issue with 1 argument buildSystem → .swiftbuild at APIDiffTests.swift:184:17: Expectation failed: (error.stdout → "").contains(regex → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program))
[2025-07-11T07:42:21.296Z] ↳ error.stdout: Swift.String → ""
[2025-07-11T07:42:21.296Z] ↳ regex: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput> → Regex<AnyRegexOutput>(program: _StringProcessing.Regex<_StringProcessing.AnyRegexOutput>.Program)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugswift buildChanges impacting `swift build`test suiteimprovements to SwiftPM test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions