Skip to content

swift: 6.2.4 -> 6.3.3 - #565702

Merged
reckenrode merged 19 commits into
NixOS:stagingfrom
reckenrode:swift-6.3-update
Oct 8, 2026
Merged

reckenrode merged 19 commits into
NixOS:stagingfrom
reckenrode:swift-6.3-update

Conversation

@reckenrode

Copy link
Copy Markdown
Contributor

https://www.swift.org/blog/swift-6.3-released/

I confirmed that everything in the Swift package set built on aarch64-darwin and x86_64-linux. I also checked eval using jj run like I did in #557896.

Things done

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: documentation This PR adds or changes documentation labels Sep 22, 2026
@reckenrode

Copy link
Copy Markdown
Contributor Author

I fixed the formatting, adding the missing redirect, and updated the release notes.

@nixpkgs-ci nixpkgs-ci Bot added the 8.has: changelog This PR adds or changes release notes label Sep 22, 2026

@nixpkgs-ci nixpkgs-ci Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for contributing to the documentation

Make sure you follow the documentation style guide, most notably:

  • Show, don't tell: lead with a minimal working example; explanation follows the code.
  • No meta-commentary: don't write "This section explains how to…", just do it.
  • Imperative mood and active voice: "Run the command", not "The user should run the following command".
  • Present tense: "This creates a folder", not "This will create a folder".
  • Be confident: no hedging with "should", "might", "typically", "usually".
  • Cut filler words: "simply", "just", "easily", "basically"; "to", not "in order to".

For larger changes, like adding or removing whole sections, ask the NixOS documentation team for a review.

@reckenrode

Copy link
Copy Markdown
Contributor Author

Pinging @booxter, @Samasaur1, and @NixOS/documentation-team (since I added a new section to the Swift documentation, and the CI bot said to do that) for reviews.

@nyabinary
nyabinary requested a review from a team September 24, 2026 06:03
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 24, 2026
@reckenrode
reckenrode marked this pull request as draft September 24, 2026 20:13
@reckenrode

Copy link
Copy Markdown
Contributor Author

I’m setting this to draft until Swift makes it through the current staging-next cycle. The Glibc and GCC updates broke a few things, which will create conflicts with this PR once the fixes are merged back into staging.

@timothyklim

Copy link
Copy Markdown
Contributor

Thank you @reckenrode for this amazing work!

Any chance for 6.4.0 with android/musl/wasm sdk's?

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 25, 2026
@reckenrode

Copy link
Copy Markdown
Contributor Author

Any chance for 6.4.0 with android/musl/wasm sdk's?

I have 6.4.0 almost done. I did them separately. The 6.3.3 update will be the one to add bootstrapping and the update script while 6.4.0 will be the mundane update that just bumps versions and updates patches (as a test/demo that Swift updates are easier now). I expect the next staging cycle to have 6.4.0 not 6.3.3.

I would like SDKs to take advantage of the Android, Musl, and WASI infrastructure in Nixpkgs. Those will come with cross-compilation (after 6.4.0 lands but hopefully for 26.11).

@reckenrode

Copy link
Copy Markdown
Contributor Author

Also, I was mostly done with 6.3.3 when 6.4.0 was tagged. I didn’t want to stop and restart.

@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 29, 2026
In preparation for bootstrapping Swift 6.3 with Swift 6.2, we need to
handle multiple different versions of Swift’s LLVM fork.
The LLVM package set uses `buildLlvmPackages.tblgen`, which will be
whatever the latest version is due `generateSplicesForMkScope`. To
ensure that the bootstrap build of the Swift LLVM fork uses its own
`llvm-tblgen`, manually define the spliced package sets.

This breaks cross-compilation of the bootstrap package set, but Swift
cross-compilation is expected to use the host toolchain to build the
target platform’s Swift and LLVM directly without using a bootstrap
toolchain (Swift 6.2.4 and its LLVM 17.0.0).
Darwin overlays LLVM in the last stage of its stdenv bootstrap. It tries
to do this in a way that works with overrides, but it’s not perfect.

To make sure it uses the correct version of compiler-rt and libclang
with the Clang wrapper in the Swift bootstrap, replace the old versions
from the stdenv with those from the Swift LLVM fork’s package set.

This is ugly, but we can’t use `wrapCCWith` because it would require
duplicating a bunch of the logic of the LLVM derivation. This seems like
a less bad solution to doing that.
- Add tests to confirm expected behavior based Apple’s utilities;
- Fix broken behavior in `copypng` and `tiffutil`.
Splitting the compilation this way works better with newer versions of
the Swift LLVM fork (i.e., `llc` crashes while this approach doesn’t).
Newer versions of Swift Syntax have additional modules. We would
hardcode them, but we need Swift Syntax in the bootstrap toolchain.
This will be needed to build the Swift 6.3 stage 1 compiler with the
Swift 6.2.4 stage 2 bootstrap compiler.
https://www.swift.org/blog/swift-6.3-released/

This is, unfortunately, a large update because most packages in the
Swift toolchain expect to be versioned together.
LLDB is not needed to bootstrap Swift. Building and saving the static
libs from the bootstrap compiler to build LLDB is a waste of time and
storage. These libs should only built for the final Swift compiler.

@booxter booxter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed every patch myself. I built Linux and Darwin and confirmed no tool is broken. I haven't spotted any remaining issues myself; my clanker did spot a few minor issues, which I leave for your consideration.


pts_x=$((dim_x * 7200 / dpi_x))
pts_y=$((dim_y * 7200 / dpi_y))
if [[ "${pts_x: -2}" = "00" && "${pts_x: -2}" = "00" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo?

}

atf_test_case cat_with_multiple_files_does_not_issue_warning_if_point_sizes_are_the_same
cat_with_multiple_files_issues_warning_if_all_not_same_dimensions_body() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

duplicate name (see line 71)

get_dimensions() {
local src=$1
local out=$(@tiffinfo@ "$src")
@tiffinfo@ "$src" | @sed@ -nE -e 's/^ *Image Width: ([0-9]+) Image Length: ([0-9]+)$/\1x\2/p'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My clanker complains that TIFF dimensions can be rational, in which case tiffinfo prints the result like 72.5. Then get_dimensions returns empty strings, which fails below in $(( ... / ... )) Even if we were to pass fractional there, bash / doesn't know how to deal with it.

>  echo $((1000/75.5))
bash: 1000/75.5: arithmetic syntax error: invalid arithmetic operator (error token is ".5")

sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
```

Note: `prefetch-swiftpm-deps` takes an optional third argument for where to save the dependencies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

third -> second

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 8, 2026
@reckenrode

Copy link
Copy Markdown
Contributor Author

I’m going to address the graphics_cmds and documentation issues in a follow-up PR. The next staging cycle is starting soon, and I don’t want to risk this slipping to the next one.

@reckenrode
reckenrode added this pull request to the merge queue Oct 8, 2026
Merged via the queue into NixOS:staging with commit d932c54 Oct 8, 2026
30 checks passed
@reckenrode
reckenrode deleted the swift-6.3-update branch October 8, 2026 14:31
insipx pushed a commit to insipx/nixpkgs that referenced this pull request Oct 8, 2026
reckenrode added a commit to reckenrode/nixpkgs that referenced this pull request Oct 9, 2026
- Fix duplicate test body;
- Handle rational X and Y resolutions;
- Support files with different X and Y resolutions; and
- Match Apple’s tiffutil behavior in the above case (swapping them).
reckenrode added a commit to reckenrode/nixpkgs that referenced this pull request Oct 11, 2026
- Fix duplicate test body;
- Handle rational X and Y resolutions;
- Support files with different X and Y resolutions; and
- Match Apple’s tiffutil behavior in the above case (swapping them).
reckenrode added a commit to reckenrode/nixpkgs that referenced this pull request Oct 11, 2026
- Fix duplicate test body;
- Handle rational X and Y resolutions;
- Support files with different X and Y resolutions; and
- Match Apple’s tiffutil behavior in the above case (swapping them).
wegank pushed a commit to loongson-community/nixpkgs that referenced this pull request Oct 13, 2026
- Fix duplicate test body;
- Handle rational X and Y resolutions;
- Support files with different X and Y resolutions; and
- Match Apple’s tiffutil behavior in the above case (swapping them).
wegank pushed a commit to loongson-community/nixpkgs that referenced this pull request Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants