Skip to content

Conversation

DougGregor
Copy link
Member

The Swift library libswiftCompatibilitySpan.dylib allows uses of Span, MutableSpan, etc. to deploy to earlier OS versions. Detect when it is needed and copy it into the build artifact.

@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@jakepetroules
Copy link
Collaborator

Note that we need this in release/6.2. You can either cherry pick it there afterwards, or land it in release/6.2 first and it'll be automatically forwarded to main.

Also, @slavapestov opened a PR for this a couple months ago (#359), I guess we should close that one now.

@DougGregor
Copy link
Member Author

Ah, I can replace this with one that targets release/6.2. Didn't realize that's how swift-build is handling branching.

@jakepetroules
Copy link
Collaborator

Ah, I can replace this with one that targets release/6.2. Didn't realize that's how swift-build is handling branching.

Yeah, we have a custom job set up... bit different from the rest of swiftlang.

FYI, you can just change the PR's target branch and force push without needing to open a new PR.

@jakepetroules
Copy link
Collaborator

jakepetroules commented Jul 4, 2025

The Windows failures:

× Test debuggableCommandLineTool() recorded an issue at BuildOperationTests.swift:390:17: Expectation failed: (executionResult.exitStatus → terminated with uncaught signal 309) == (.exit(0) → exited with status 0)

...look like STATUS_DLL_NOT_FOUND, meaning the binary that's running is failing to find some dependent DLL.

EDIT: not a blocker, this is showing up everywhere.

slavapestov and others added 3 commits July 7, 2025 11:58
A couple of related fixes:
* Use 26.0 as the fallback version number when SDKSettings doesn't include SwiftSpanMinimumDeploymentTarget
* Update tests to expect `--back-deploy-swift-span` and check when it shouldn't be there
@DougGregor DougGregor force-pushed the compatibility-span branch from 80215d6 to f64487d Compare July 7, 2025 19:00
@DougGregor DougGregor requested a review from jonathanpenn as a code owner July 7, 2025 19:00
@DougGregor DougGregor changed the base branch from main to release/6.2 July 7, 2025 19:00
Copy link
Collaborator

@owenv owenv left a comment

Choose a reason for hiding this comment

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

This is looking good to me. There's a chance some more tests might need tweaks since CI is on Xcode 16.2 and associated SDKs, but we'll see.

@owenv
Copy link
Collaborator

owenv commented Jul 7, 2025

@swift-ci test

@DougGregor DougGregor force-pushed the compatibility-span branch from f64487d to 6b581ea Compare July 7, 2025 19:09
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

FYI, you can just change the PR's target branch and force push without needing to open a new PR.

Yep, done!

@jakepetroules
Copy link
Collaborator

@swift-ci test macos

@jakepetroules
Copy link
Collaborator

I misread the CI results -- there's a few which still need adjustment. Here's a link to the last failing run: https://ci.swift.org/job/pr-swift-build-macos/1004/console

@DougGregor
Copy link
Member Author

@owenv has a suggestion for making the tests run properly on older Xcodes, I'll get that pushed soon

… versions

Xcode versions that predate Xcode 26 don't include the Span
back-deployment library. Introduce a hack to make it easier to still
test with those Xcode versions.
@DougGregor
Copy link
Member Author

@swift-ci test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test Linux

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 187d0ae into swiftlang:release/6.2 Jul 8, 2025
23 of 24 checks passed
@DougGregor DougGregor deleted the compatibility-span branch July 8, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants