Swift 6.4.2 : mise à jour de maintenance et améliorations sur le compilateur
Swift 6.4.2 est disponible depuis quelques heures. Il s'agit d'une version de maintenance de la branche 6.4 :
- correction de nombreux bugs
- stabilisation sur le compilation, Swift Package Manager, Swift Build, Foundation
Installation va Swiftly : swiftly install 6.4.2 ou install latest
Xcode 27.2 intègre cette version.
Source : https://forums.swift.org/t/announcing-swift-6-4-2/90337
Liste complète des corrections
Compiler and Optimizer
- Fixed a miscompile in optimized builds affecting statically initialized arrays of imported C structs with trailing padding. (swift#91557)
- Fixed a miscompile that caused a false exclusivity violation at runtime in some cases involving
deinit. (swift#91820) - Fixed a debug-build crash in some
asyncfunctions with large SIMD parameters such asSIMD3<Double>. (llvm-project#14048) - Fixed a 6.4 regression with
@TaskLocalwhen it is followed by another attribute. (swift#93063) - Fixed a crash when loading precompiled Clang modules with a missing directory. (llvm-project#14045)
- Fixed a compiler error for
distributed varproperties when exported symbol validation is enabled. (swift#91640) - Fixed an ABI stability issue for protocol conformances of types annotated with
@_originallyDefinedInthat are moved into their protocol's module. (swift#92673)
Availability
- Computed properties with an init accessor and an initial value can no longer be marked unavailable. (swift#91742)
- Structs with unavailable init accessors no longer get a synthesized memberwise initializer. (swift#91748)
- Fixed a 6.4 regression in availability checking for code unavailable in app extensions. (swift#91750)
@_originallyDefinedInis now always printed in swiftinterfaces. (swift#92065)- Fixed a name collision involving availability domain macros. (llvm-project#13986)
- Fixed an issue where
-define-availabilitycould treat equal versions as different. (llvm-project#13291)
Standard Library
- Fixed
ArrayandContiguousArray init(unsafeUninitializedCapacity:initializingWith:)so that an invalidinitializedCountnow traps instead of causing undefined behavior. (swift#91690)
Debugger
- LLDB expressions no longer fail when a variable that is not used by the expression is not available. (llvm-project#13990)
- Fixed a debugger crash on type names that can't be demangled. (llvm-project#14060)
- Fixed an LLDB hang when a REPL expression hits a breakpoint. (llvm-project#14452)
- Fixed an out-of-bounds write when parsing
MultiMemReadresponses; invalid responses now produce an error. (llvm-project#14374) - Fixed LLDB reading unmapped memory when loading libraries from the dyld shared cache. (llvm-project#14297)
- Fixed incorrect Wasm data segment names in LLDB when name entries are out of order. (llvm-project#14389)
- Fixed stepping through "lazy library" stubs in binaries built for macOS 27 and later. (llvm-project#14491)
Swift Package Manager
- Fixed package traits that are conditionally enabled by other traits sometimes not being enabled. (swift-package-manager#10579)
- SwiftPM now warns instead of failing when traits are enabled on a dependency that declares none. (swift-package-manager#10584)
- Fixed packages from different registries sharing a download cache, so each registry's copy is now validated. (swift-package-manager#10574)
- Improved performance when a package's target directories contain symlink cycles. (swift-package-manager#10462)
- Fixed a 6.4 build error when two dynamic library products shared a static library product. (swift-package-manager#10482)
- Fixed executables used as plugin dependencies not being built in non-cross-compiling builds with Swift Build. (swift-package-manager#10452)
PackageDescription.Traitis nowSendable, so you can declarestatictrait variables in an extension of it. (swift-package-manager#10453)
Swift Build
- Fixed a build error ("no library for this platform was found") when using multi-architecture XCFrameworks on Linux, and a case where the wrong architecture's slice could be chosen. (swift-build#1587)
- Fixed framework builds re-running InstallAPI unnecessarily during incremental builds. (swift-build#1681, swift-build#1722, swift-build#1742)
- Deduplicated
-add_ast_pathlinker arguments, which could exceed the command-line length limit when linking many Swift libraries. (swift-build#1683) - Fixed an issue where a dynamic package product could be incorrectly diagnosed as a missing dependency. (swift-build#1808)
- Improved build failure handling by skipping an unnecessary sandbox log scan for tasks that fail during setup. (swift-build#1691)
- Fixed a hang in Swift Build on Windows and Linux when a process failed to launch. (swift-build#1830)
- Testing frameworks are no longer embedded into build products when building for the appropriate deployment target. (swift-build#1718)
- Fixed codesign failures when building inside a cloud-synced directory on macOS 14 and later. (swift-build#1731)
Foundation
- Added a missing lower-bounds check to
Data.resetBytes(in:). (swift-foundation#2214) - Fixed
Data.write(to:options: .atomic)failing with a permissions error on some Linux file systems. (swift-foundation#2240) Datecomparisons with<=and>=now handle NaN correctly. (swift-foundation#2230)- Fixed a crash in
XMLNodewhen a node name has no prefix, found with newer versions of libxml2 on Windows. (swift-corelibs-foundation#5546)
Swift Testing
- Fixed incorrect event descriptions in Swift Testing's JSON output when a test runs multiple iterations. (swift-testing#1935)
Regex
- Fixed an incorrect regex representation when
RegexBuildermerged literals across nested regexes. (swift-experimental-string-processing#875)
Corelibs libdispatch
- Fixed a Linux crash in
_dispatch_event_loop_drainfor read sources on pipes. (swift-corelibs-libdispatch#971)