Skip to content

🍒 Cherry pick StdlibDeploymentTarget to 6.2 #82838

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

Merged
4 commits merged into from
Jul 14, 2025

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented Jul 7, 2025

We need this to avoid assertion failures or crashes from the Concurrency runtime.

rdar://155214488

al45tair added 2 commits July 7, 2025 12:04
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget.
@al45tair al45tair requested a review from a team as a code owner July 7, 2025 12:05
@al45tair
Copy link
Contributor Author

al45tair commented Jul 7, 2025

@swift-ci Please test

@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jul 7, 2025
@al45tair
Copy link
Contributor Author

al45tair commented Jul 7, 2025

Explanation: The existing availability set-up had a problem wherein it was difficult or impossible to use newly added code to reimplement older code because the availability annotations are applied even within the defining module. To fix this, I'd added a new StdlibDeploymentTarget availability macro, which solves the problem by setting the macro to match the build system, unless we place it into strict mode.
Risk: Medium. This is quite a large changeset and it changes the build system. On the other hand, it has been in use on main for some time now.
Original PR: #81440 #81940 #82018
Reviewed by: @ktoso, @stephentyrone, @edymtt, @etcwilde, @tshortli
Resolves: rdar://155214488 (rdar://148275746, rdar://152498657)
Tests: The test suite should exercise these changes already.

bnbarham and others added 2 commits July 8, 2025 11:25
…loyment-version

[Build] Fix the minimal-stdlib build by setting a deployment version.
The availability flags keep increasing the number of characters on the
command line overflowing the maximum character length on Windows and
making the commands harder to read. This patch moves the generated
arguments into a separate response file so that they can continue to
grow without running into argument length limitations.
@al45tair
Copy link
Contributor Author

al45tair commented Jul 8, 2025

@swift-ci Please test

@tbkka
Copy link
Contributor

tbkka commented Jul 9, 2025

CC: @tshortli


// This no longer warns, because of the use of StdlibDeploymentTarget in the
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit unfortunate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I couldn't see a good way around that for this test.

# NOTE: The build system will define another macro, StdlibDeploymentTarget, for
# each SwiftStdlib macro defined in this file. The difference between the
# two is the the StdlibDeploymentTarget macro will never be set to a
# higher version than the machine on which we are building.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would find this clearer phrased as

Suggested change
# higher version than the machine on which we are building.
# higher version than the deployment target for which we are building.

@al45tair al45tair closed this pull request by merging all changes into swiftlang:release/6.2 in eefdd69 Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants