Skip to content

Update dependency apple/swift-atomics to from: "1.3.0" #31

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 4, 2025

This PR contains the following updates:

Package Update Change
apple/swift-atomics minor from: "1.0.3" -> from: "1.3.0"

Release Notes

apple/swift-atomics (apple/swift-atomics)

v1.3.0: Swift Atomics 1.3.0

Compare Source

This minor release fixes a severe miscompilation issue when the experimental LTO feature is enabled. It also bumps the minimum supported toolchain to Swift 5.10, removing the obsolete atomics implementation that used to import operations from standard C.

There were no API-level changes. Clients on older toolchains will not be harmed by this tag -- they will continue to get version 1.2 (or 1.0, 1.1, depending on their toolchain version and dependency specification).

What's Changed

New Contributors

Full Changelog: apple/swift-atomics@1.2.0...1.3.0

v1.2.0: Swift Atomics 1.2.0

Compare Source

This minor release adds support for Swift 5.9.

This release contains no API-level additions nor any other visible changes to stable interfaces; the version number bump is simply acknowledging that this release ships a full rewrite of package internals -- it isn't just a regular bug fix release.

Changes
  • This release requires Swift 5.7 or later. (Clients on older toolchains will automatically remain on the 1.0 or 1.1 releases.)
  • The package now supports being used as a dependency in projects that have C++ interoperability enabled in Swift 5.9.
  • On Swift 5.9+, atomic operations are now implemented using native Swift compiler builtins. The package no longer forwards to C atomics when built on newer toolchains.
Fixes
  • Minor documentation fixes.
Pull Requests

New Contributors

Full Changelog: apple/swift-atomics@1.1.0...1.2.0

Thank you very much to everyone who contributed to this release!

v1.1.0: Swift Atomics 1.1.0

Compare Source

This minor release improves support for recent Swift releases, adds new functionality and resolves some known issues.

Changes
  • This release requires Swift 5.6 or better. (Clients on older toolchains will automatically remain on the 1.0 releases.) (#​67)

  • AtomicReference is now unconditionally available on all supported platforms. (#​65 by @​kelvin13)

  • ManagedAtomic now conforms to Sendable when its Value is Sendable. (#​45)

  • RawRepresentable types can now opt into support for atomic operations on their optional values as long as their underlying RawValue also supports it. (#​42 by @​glessard)

    struct SomeValue: RawRepresentable, AtomicOptionalWrappable {
      var rawValue: UnsafeRawPointer
    
      init(rawValue: UnsafeRawPointer) {
        self.rawValue = rawValue
      }
    }
    
    let atomic: ManagedAtomic<SomeValue> // OK
    let atomic2: ManagedAtomic<SomeValue?> // Also OK!
  • The weakCompareExchange operation now comes with a variant that takes a single ordering (#​75). This makes it less verbose to use it in the common case where the same ordering is needed on both the success and the failure paths.

    let atomic = ManagedAtomic<Int>(42)
    
    var original = 0
    var exchanged = false
    repeat {
      (exchanged, original) = atomic.weakCompareExchange(
        expected: original,
        desired: 23,
        ordering: .relaxed) // no need to specify a separate failureOrdering!
    } while !exchanged
  • DoubleWord.low and DoubleWord.high are now deprecated (#​70). Use first and second instead.

  • This release lays the groundwork for replacing the use of C atomics with native Swift compiler intrinsics (#​74). When it eventually becomes stable, this change will allow swift-atomics to support Windows (#​56), and it will resolve a multitude of build problems on other platforms (e.g., #​54, #​55, #​62, #​8). Version 1.1 ships with experimental support for building the package in this mode; however, this mode is not enabled by default, and it is subject to arbitrarily change in any future release.

Fixes
  • ManagedAtomicLazyReference no longer leaks its value when it is deinitialized (#​66).

  • AtomicReference conformances on non-final classes no longer emit a compiler warning in Swift 5.7 and later (#​53). Atomic references now fully support class hierarchies, but only the superclass that introduced the AtomicReference conformance can be used as the type argument to ManagedAtomic or UnsafeAtomic. This turns a previously undiagnosed type safety violation into an unconditional compile-time error:

    class Base: AtomicReference {}
    // 1.0: warning: Non-final class 'Base' cannot safely conform to protocol
    //    'AtomicValue', which requires that 'Self.AtomicRepresentation.Value'
    //    is exactly equal to 'Self'; this is an error in Swift 6
    // 1.1: OK
    
    class Derived: Base {} 
    
    let ref1: ManagedAtomic<Base> = .init(Derived()) // OK
    let ref2: ManagedAtomic<Derived> = .init(Derived())
    // 1.0:
    //    no error, silent type safety violation
    // 1.1+: 
    //    error: 'ManagedAtomic' requires the types 'Derived' 
    //    and 'Base' be equivalent
  • All atomic operations are now implemented in terms of Int8, Int16, Int32, Int64, Int, or DoubleWord. The package no longer uses non-standard C to implement atomic operations on Bool (#​37).

  • Building the package tests is now far less resource-intensive, considerably speeding up builds on some memory-constrained systems (#​71).

Pull Requests

Full diffs: apple/swift-atomics@1.0.3...1.1.0

Thank you very much to everyone who contributed to this release!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

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.

0 participants