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