XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Swift Forums - Latest posts

Latest posts

SE-0556: Cell, ConstCell, and Volatile

Douglas_Gregor: Alright, so the thinking here is that Cell can use get/set, with whatever optimization barrier we need to put in place to make sure we deal with aliasing. That's conservatively correct. As a more general model of aliased storage comes along, we replace the get/set with your proposed borrow(aliased)/mutate(aliased). This lets the optimizer reason more about the effects of aliasing, but doesn't make any existing code worse. Right. And not just the "optimizer", either; this will…

[Pitch #2] Unifying Package Products and Targets

owenv: The deprecation of products described in the proposal is intended to allow incremental adoption wherever possible. Requiring mechanically renaming all, for example, .executableTargets to .executable is an additional change that needs to happen immediately to keep the manifest compiling. Sorry, I'm not proposing that we force people to abandon their existing uses of .executableTarget. There's no reason why one cannot alias the other going forward if we want to, and neither even has to…

[Pitch] Add Issue Capturing & Test-Utility-specific module to Swift Testing

younata: TestingUtilities I'm not too attached to this name. As mentioned in the pitch doc, this module was initially named TestingTools. After plenty of discussion, I changed the name because some folks view a Testing Tool as something which operates on the Testing Library ABI (such as an IDE like xcode and vscode), not something which operates on the Testing Library API. In fact, while writing out these comments, I've had a couple other ideas that perhaps better capture the intent here:…

[Pitch] Add Issue Capturing & Test-Utility-specific module to Swift Testing

mbrandonw: And I would prefer the version that matches on issues to be named similarly to withKnownIssue: withExpectedIssue { … } matching: { … } And this latter function does not need to return the array of issues. I think returning such an array is confusing because it's not clear if it returns all reported issues, or just ones that match, or don't match. One thing that isn't clear to me is what happens if there are multiple issues recorded during the execution of the first closure, and not…

[Pitch #2] Unifying Package Products and Targets

I agree with @owenv here. We're trying really hard not to disrupt the ecosystem of packages we have today. Being perfect in naming comes at a cost I don't think we want to force on everyone. I'd much rather be familiar so users can adopt the new features without relearning terminology. It's not really an implementers view, it's an ecosystem custodian's one, of which we all are.

Compiler Build System Roadmap

Compiler Build System Roadmap This is the third update to the vision roadmap for improving the build system. This update is focused on the compiler. The first step worked through splitting the runtime libraries into a separate build under the Runtimes/ directory. The runtime work is largely done with the exception of building the embedded runtimes. The second step splits the test suite, enabling us to build the compiler and runtimes independently of building and testing the runtime in order to…

Decoupling Swift Compiler and Runtime Testing

Slava_Pestov: So while I agree that making test cases self-contained where possible is a good thing, I also believe that quite a number of the existing ClangImporter and Sema tests that exercise these features would give us better coverage if they used the real Foundation on Apple platforms. I'm not suggesting that we don't test against the real thing, but migrate certain tests to use a self-contained mock. The validation suite will still require a full platform sysroot and Swift SDK. In…

Build and Packaging WG Meeting: Nov 19 2026

The Build and Packaging Workgroup will be holding its next meeting on Thu, Nov 19, 2026 4:00 PM UTC This meeting will be open to anyone who has a topic they'd like to discuss. If you wish to participate, please reach out to @build-and-packaging-workgroup via DM with anything you'd like to add to the agenda for a link to the WebEx meeting.

[Pitch #2] Unifying Package Products and Targets

It's not primarily an implementation concern, but a desire to minimize how much of a manifest the user needs to immediately rewrite when upgrading an existing package to the new tools version. The deprecation of products described in the proposal is intended to allow incremental adoption wherever possible. Requiring mechanically renaming all, for example, .executableTargets to .executable is an additional change that needs to happen immediately to keep the manifest compiling. We could keep the…

[Pitch #2] Unifying Package Products and Targets

owenv: I'm not convinced we should use one disruptive change, which has significant functional benefits, to justify also making a similarly disruptive change to naming which has an (IMO) much smaller ergonomic benefit. I'm open to being convinced otherwise, but in my mind most of the proposed alternate names for manifest API are motivated by eliminating some redundancy, but don't significantly improve clarity. I'd argue that you're looking at it from the implementer's standpoint, which is not…

[Pitch #2] Unifying Package Products and Targets

I'm not convinced we should use one disruptive change, which has significant functional benefits, to justify also making a similarly disruptive change to naming which has an (IMO) much smaller ergonomic benefit. I'm open to being convinced otherwise, but in my mind most of the proposed alternate names for manifest API are motivated by eliminating some redundancy, but don't significantly improve clarity.

[Pitch #2] Unifying Package Products and Targets

xwu: Curious: is the target part of .libraryTarget needed for disambiguation? would it be possible to just have these written as .library and .executable within targets: [...]? We could choose rename it, it was chosen just because libraryTarget is consistent with executableTarget/testTarget and I decided to avoid renaming those to avoid increasing the magnitude of change.

[Pitch #2] Unifying Package Products and Targets

Hello, I'd like to share a revised proposal for unifying products and targets. The original pitch discussion can be found here. The updated version contains a number of changes based on the initial feedback and what's been discovered while implementing the change and testing it out with some existing packages. It: Expands on the motivation behind the change Contains much more detail regarding how declaring link dependencies works in the new tools version, and changes from SwiftPM's current…

Target environment conditions in package manifests

FranzBusch: Yes and I know there is precedence with the macCatalyst platform but I wanted to avoid introducing custom name mapping for the environment and instead stay true to the actual environment part of the triple. Maybe overly nitpicky, but I would agree it should then be macabi if it's not macCatalyst; macABI is neither one nor the other, and I think the doc comment gives away the problem: /// The Mac Catalyst /* (1) */ environment. public static let macABI /* (2) */: TargetEnvironment

SwiftUIWeb: Bringing SwiftUI to the browser with Embedded Swift and WebAssembly

Thanks for trying it! And yes, absolutely. Keeping the API as close to Apple's SwiftUI as possible is one of the main goals. Embedded Swift and the browser introduce some unavoidable limitations, but whenever something behaves differently from SwiftUI, I want to fix it in the framework rather than make developers rewrite their views. The Food Truck example has been especially useful for finding those gaps!

SwiftUIWeb: Bringing SwiftUI to the browser with Embedded Swift and WebAssembly

Thanks for mentioning these! They're all interesting projects, but I think each one takes a pretty different approach. OpenSwiftUI aims to reimplement SwiftUI across platforms, Skip maps SwiftUI to native Jetpack Compose on Android, and SwiftUIWeb is built specifically around Embedded Swift, WebAssembly, and the browser's DOM/CSS. One of the biggest challenges is that Embedded Swift doesn't support several runtime features that other Swift implementations can rely on. Some Foundation APIs and…

Target environment conditions in package manifests

jakepetroules: where a PartialTargetTriple is composed of a Platform and an Environment. We need to keep in mind that the same triple might apply to different platforms defined by Swift SDKs (where custom platforms are most likely to come from), especially in the embedded space where triples like "riscv32-unknown-none-elf" isn't sufficient to define what the platform is as we would need to express in these conditions. I like this approach as we could add more fields to the custom platform as…

Isolated conformance check is skipped for decode([User].self) and sorted() under default MainActor isolation

With -default-isolation MainActor, the SE-0470 rule that an isolated conformance can only be used in its own isolation domain is enforced for decode(User.self, ...) and not enforced for decode([User].self, ...). The same happens with several standard library algorithms. // swiftc -swift-version 6 -default-isolation MainActor import Foundation struct User: Codable { var name: String } struct Point: Comparable { var x = 0 static func < (a: Point, b: Point) -> Bool { a.x < b.x } } @concurrent func…

Lazy NSObject + deinit = trap

dheerendra: Practical rules: don't initialize lazy properties in deinit, and don't form new references (weak or strong) to self there. If cleanup needs the value, make it non-lazy or check whether it was ever created. Easy to say than done, as the usage of a lazy property could be obscure / indirect and not always obvious. Example: import Foundation protocol FooDelegate: AnyObject {} class Foo { weak var delegate: FooDelegate? init(delegate: FooDelegate?) { self.delegate = delegate } func…

GYM Paper: open-source SwiftUI workout & nutrition app for iPhone and Apple Watch

Hi everyone! I'm a product designer, and I just open-sourced GYM Paper, a free workout and nutrition tracker for iPhone and Apple Watch that's live on the App Store. It's MIT-licensed: Repository designermetehan-coder/gym-paper GitHub - designermetehan-coder/gym-paper: Free, open-source workout & nutrition tracker for... Free, open-source workout & nutrition tracker for iPhone and Apple Watch, designed and built end to end with AI. What's in the repo: iPhone app: SwiftUI (iOS 18+), SwiftData…

Lazy NSObject + deinit = trap

The difference comes from which runtime handles the weak reference. For an NSObject subclass, weak var y = self goes through the Objective-C runtime's weak table, which deliberately aborts if you form a weak reference to an object that's already deallocating. That's the "Cannot form weak reference … in the process of deallocation" message. Pure Swift classes use Swift's native reference counting, which doesn't trap here: the weak reference just ends up nil. That explains why it only happens…

Why does my AsyncSequence with no non-isolated next() function crash on iOS 18.1?

Your iterator now only implements next(isolation:). That means the next() requirement of AsyncIteratorProtocol is satisfied by the standard library's default implementation in a protocol extension. That's the symbol dyld can't find: the typed-throws default lives in the Swift runtime that ships with the OS, so it doesn't exist on older OS versions like iOS 18.1. Ideally the compiler would flag the conformance as unavailable on your deployment target instead of letting it fail at load time, so…

Internal global actor on public API not accepted in XCFrameworks

This happens because of library evolution, not because of the global actor itself. With a source target, the client compiles against the full module, so it can see MyGlobalActor even though it's internal. When you build the XCFramework with BUILD_LIBRARY_FOR_DISTRIBUTION=YES, clients compile against the generated .swiftinterface instead. That file only contains public declarations, yet public func myFunc() is printed with @MyGlobalActor on it. That leaves a reference to a type that doesn't…

Creating an xcframework from a Swift Package with binaries

The part that usually breaks is the C module. If EasyAlgo's public Swift interface imports CAlgo, the generated .swiftinterface references CAlgo. Every consumer then needs CAlgo's modulemap and headers too, and they aren't inside your framework. Two approaches that work: Hide it. Use internal import CAlgo (or @_implementationOnly import CAlgo) everywhere in EasyAlgo, and make sure no public API uses C types. If CAlgorithm is a static library, it gets linked into EasyAlgo.framework, and…