XIO

xWire

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

Swift Forums - Latest posts

Latest posts

ZenCODE: an open-source coding agent in Swift with Xcode and SwiftPM tools

Hi everyone, I'd like to share ZenCODE, an open-source (MIT) coding agent I've been building in Swift 6. It runs in the terminal or as an Agent Client Protocol (ACP) agent inside editors, and it ships as a single native zen executable for macOS, Linux, and Windows via WSL (it also runs on a Raspberry Pi). What may be interesting for Swift developers Xcode integration. ZenCODE connects to Xcode 27 over ACP as a coding agent. The optional xcode-tools package bridges Xcode's own MCP server (xcrun…

Request for review: Preserve async-let typed errors (#91964)

Hi everyone! I'm a new contributor to the Swift project and I'm not entirely familiar with the usual PR review process or how long it typically takes to get feedback. I have grown increasingly frustrated by the fact that async let doesn't preserve the thrown error type of a typed-throwing function. After looking into it, I discovered that this had already been reported some time ago in issue #76169 but I couldn't find any indication that anyone had started working on a fix. So I decided to give…

JWTKit 5.8.0 Security Update

We've just released JWTKit 5.8.0 and JWT 5.2.0 which contain a number of security fixes discovered from external reporters and fuzzing. We recommend that you update as soon as possible. If your application uses provider identity tokens for login, you may also need to configure an expected client or project ID, or migrate to the new audience-aware verification APIs. Updating alone does not secure login paths that continue to accept tokens without checking their audience. See more information on…

Pitch: Single-yield functions

jrose: I'd be hesitant to pursue this because it depends on the body—there are several criteria ("yields exactly once", "does not throw after yielding") that aren't visible just from the declaration signature. It would be nice™ and maybe we can make it easier in the future, but the "auto" part is probably not going to fly. I did call the idea crazy I don't think it's something that this proposal has to address immediately, but I'd love to see an audit of, say, the standard library and…

Pitch: Single-yield functions

xwu: func f() yields(T) This also has the advantage of admitting a return type (distinct from the yield type) if we decide that's wanted in the future. As I understand it, this debate has (amongst other things) paralyzed Rust's coroutine work for a number of years. On the other hand, it marks a split from yielding accessors, where I feel like this is intended as a "natural generalization" of those.

[Pitch#2] send and @oneway method calls

Is two groups too many? Who wants to always send a @oneway but is comfortable sending a @oneway(never)? Diagnostic groups come with a userdoc, and it seems to me like these would have the same doc, explaining send wrt @oneway annotation. Maybe the thinking is you'd want to opt out of them separately, if you enabled them for the whole project? Neither nonisolated, nonisolated(nonsending) or @concurrent functions, cannot be called using send. Is this vestigial from when this was distributed…

Pitch: Single-yield functions

meg-gupta: func f() -> yield T // yields an owned value func f() -> yield borrow T // yields a borrowed value func f() -> yield inout T // yields a mutable value KeithBauerANZ: Agree that yielding seems a better choice both grammatically and for reuse of the existing keyword. Hmm, if the comment explaining this feature "wants" to write yields, then why don't we just do that--just like throw/throws: func f() yields(T) (We can always quibble about the punctuation.)

Pitch: Single-yield functions

Agree that yielding seems a better choice both grammatically and for reuse of the existing keyword. yielding borrow T is also ungrammatical and doesn't reuse the borrowing keyword (where yielding inout T does reuse the existing keyword). yielding borrowing T isn't great but I think it's better. The proposal doesn't seem to address where in the calling function these coroutines are resumed, and whether or not they form a strict stack. Maybe that behavior is already specified elsewhere for…

Pitch: Single-yield functions

allevato: there's a path where for certain kinds of with* functions the compiler could auto-synthesize a yielding version I'd be hesitant to pursue this because it depends on the body—there are several criteria ("yields exactly once", "does not throw after yielding") that aren't visible just from the declaration signature. It would be nice™ and maybe we can make it easier in the future, but the "auto" part is probably not going to fly.

Pitch: Single-yield functions

Very cool, this is something I've wanted for a long time. Defers It isn't called out in the proposal, but do defer statements work as one would expect with yield? func f() -> yield T { let t = getAT() defer { t.release() } yield t // t.release() should happen here } Multiple yields Since it's listed as a future direction, could you also provide some more insight on what more is needed to support multiple yields? Generators are one of the big things I'm interested in here, which this proposal…

Swift on the GPU

I had a somewhat working pass at this a few weeks ago. I don’t think it actually solves many of the problems we commonly encounter with Metal. But it was an interesting experiment. Repository schwa/schmetal GitHub - schwa/schmetal: Write Metal shaders in Swift syntax (but don't) Write Metal shaders in Swift syntax (but don't) L

Pitch: Single-yield functions

This sounds like a great pitch. The only bikeshedding I have is that I think yielding would be better than yield in the function declaration (not the yielding func alternative, but still keeping it next to the returned type), i.e.: func f() -> yielding T // yielding an owned value func f() -> yielding borrow T // yielding a borrowed value func f() -> yielding inout T // yielding a mutable value This would also make it more consistent with the yielding syntax we currently have for accessors.

Negated type patterns in `catch`

I'm not sure if it would be good but it seems like if your error enum can be constructed for arbitrary Error types, and the purpose of this syntax is just to rethrow or wrap, the compiler could do that for you and you can just write try. protocol ConvertableFromError: Error { /// Compiler promises to only call this init after attempting to as? cast your error. init(wrapping: some Error) } And the implementation could map to cases for specific known errors... I'm not sure how much this buys over…

Negated type patterns in `catch`

theoriginalbit: Mirroring the existing catch is MyError and catch let error as MyError would yield the spellings catch not MyError and catch let error not MyError; is not would read better, but I'm unsure whether requiring two keywords is desirable. Having a not keyword would very likely not be accepted as it is explicitly barred for Swift Evolution proposals for Boolean values like is provides. If you really want these semantics, you might want to seek ~is/!is as a keyword. The keyword is only…

Pitch: Single-yield functions

Hi everyone, This is a pitch to introduce single-yield functions to the language. Single-yield functions are declared by writing yield in the result position: func f() -> yield T // yields an owned value func f() -> yield borrow T // yields a borrowed value func f() -> yield inout T // yields a mutable value A single-yield function is a coroutine that runs until it reaches a yield statement. It then yields a value to its caller and suspends. When the caller is finished accessing the value, the…

[Pitch#2] send and @oneway method calls

@ktoso Thanks for writing this, I'm excited to see how this pitch evolved! It looks very good! IMO the motivation behind the statistic was unfortunate and could be misunderstood, perhaps can derail the discussion on the formal proposal. I had the same thought when I came across that part as noted by Franz here: The motivation section of this proposal says that 70% of the Task {} usages were fire-and-forget but it doesn't state if those fire-and-forget usages were valid in the first place. I…

[Pitch#2] send and @oneway method calls

Neither nonisolated, nonisolated(nonsending) or @concurrent functions, cannot be called using send. Why not? Sending one-way sync jobs to concurrent executor might be handy as well. I see a lot of DispatchQueue.global().async { ... } in our codebase. @oneway is not accepted on properties, computed properties, subscripts, or static functions, because they cannot be used with send. What about global-actor isolated static functions, or parameter-isolated static functions? let collect =…

Negated type patterns in `catch`

Has anyone else wanted a negated type pattern in catch? I couldn't find an earlier thread on this. Particularly since the introduction of typed-throws (SE-0413) I find myself often writing a forwarding clause when a do body mixes different typed and untyped throws (or just different typed throws). func fn() throws(MyError) { do { try someTypedThrows() // throws(MyError) try someUntypedThrows() } catch let error as MyError { throw error // making sure it doesn't end up wrapped in .unhandled }…

Slim source distributions via SwiftPM registries: a use case for exact version matching

Thanks, that is a useful limitation to make explicit. For the workflow I described, I think it is reasonable for the application to add an explicit exact requirement for C when it needs a particular packaging revision, even if C would otherwise only be a transitive dependency through B. That requirement would still need to satisfy B's version constraints. Assuming SCM-to-registry mapping identifies both references to C as the same package, the application could explicitly select…

Slim source distributions via SwiftPM registries: a use case for exact version matching

I agree that publishing optimized archives through existing registries is the right starting point. Registry archives avoid downloading Git history, but they do not necessarily exclude tracked test fixtures, benchmarks, or other files unnecessary for downstream builds. A registry standardizes how source archives are distributed, not how their contents are selected or optimized. The registry specification accepts a publisher-supplied source archive; it does not require automatic selection of…

Pitch: SocketDescriptor

Thanks for opening this pitch. I think this is an important and long-standing gap that we should fill in swift-system. I agree with @jrflat that this should be ~Copyable similar to the pitched Win32 types. I wish we could go back and make FileDescriptor ~Copyable as well. Jonathan already explained it well which benefits we get from ~Copyable usage here and from personal experience I have modeled those types with ~Copyable for the past two years and it has saved me multiple times from…

SE-0560: Build configuration conditionals for target dependencies

Hello, Swift community! The review of SE-0560: Build configuration conditionals for target dependencies begins now and runs through November 11, 2026. Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to me as the review manager by email or DM. When contacting the review manager directly, please put "SE-0560" in the subject line. What goes into a review? The goal…