SE-0550: `@noSanitize` attribute for functions
The Language Steering Group has accepted this proposal.
Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.
The Language Steering Group has accepted this proposal.
Hello, Swift community! The review of SE-0550: @instrumentation attribute for functions ended on October 20th. Feedback on this proposal was that the feature itself was generally useful, with most of the discussion revolving around the spelling and about specific implementation details. The review period was extended to give the community time to comment on changes that were requested by the Language Steering Group during its initial review. Those changes were: Rename the attribute to…
I also wonder if it is a SPM issue: it could be that during the manifest build, SPM is not properly invoking the compiler?
That really doesn't belong on the swift-installer-scripts repo, the installer is not responsible for issues related to clang. If you look at the error: 13 | #include <stdlib.h> | `- error: 'stdlib.h' file not found it seems like a user error: missing a standard header implies that your Visual Studio installation is corrupt or missing.
Hello, I raised Unable to build SwiftPM due to `error: could not build module '_Builtin_intrinsics'` · Issue #586 · swiftlang/swift-installer-scripts · GitHub a few days ago as I'm unable to use the EXE installer to build a Swift package. Does anyone have any ideas where the issue may be?
Hello everyone! I want to share a small funny project I did recently. A Windows 95 inspired components kit in SwiftUI. What's inside: Supprot iOS 18+, macOS 15+ 25+ reusable components Built-in Workspace navigation, including Task Bar and Windows. Primitives like Theme, Fonts, Colors, etc. You can use the controls individually, or built-in workspace navigation. Define a route, give it some SwiftUI content, and add a link to open it: import SwiftUI import Swift95 enum Screen: Hashable { case…

Yeah the underlying object being wrapped is a HANDLE, which is an opaque identifier similar to a file descriptor. A client could use unsafeRawHandle to get this HANDLE and call CloseHandle on it, but that's misuse like Slava mentioned. The reason we offer unsafeRawHandle is so clients can adopt Win32.FileHandle even if System doesn't support the Win32 functions they need yet. There's also relinquish(), which consumes the Win32.FileHandle, for when a client needs to pass ownership of the…
Thanks for the feedback, everyone. The Language Steering Group has accepted this proposal.
Hi everyone. The review of SE-0557, Add RawSpan primitive to Hasher, ran from October 12 through October 20, 2026, and the Language Steering Group has decided to accept this proposal. It is a straightforward adaptation of the existing Hasher.combine(bytes: UnsafeRawBufferPointer) API to also work with the safe RawSpan type. Reviewers raised a couple of points of feedback, which the Language Steering Group does not believe require changes to the proposal as written: Unsafety of accessors…
tera: Is there an actual system/kernel object (like a file descriptor or socket) under the hood here, with this new API acting as a wrapper on top? If so, what happens if that underlying handle gets closed out from under it? The wrapper would still think it's valid and try to use it, right? And if the system recycles that exact same ID for a completely new, unrelated file descriptor, would the wrapper accidentally override or mess with that new file's data? Well, this is no different than if I…
This pitch looks really exciting -- thanks for sharing! I have a build tool plugin that generates a C header and module map into a target that otherwise holds only the adopter's Swift code. Right now that needs the adopter to have a second, almost-empty C target to carry the generated files, with a placeholder .c and a .gitkeep in include/. I'm hoping the new changes in SwiftPM will avoid that additional target. With the pitch PoC this works for a library target without an include/ directory…

we are trying to make the process more easy, adding more default permissions, and adding default ui with leaf, elementaryui, htmlkit, plot .... that make it more easy for everybody to used
I'm developing an app with a Vapor backend, and it will eventually need a "real" auth layer. SecurityKit sounds promising, so I wanted to see if it is still active.
What do you need? For work reasons I have not been able to upload a lot of updates that we use in prod but soon I will have a series of updates
Neither constraint applies to new Windows APIs, so we should pursue an owning, noncopyable type instead. A double close or use after close then becomes a compile error, a dropped handle is closed rather than leaked, and every signature says clearly whether it borrows or consumes. Is there an actual system/kernel object (like a file descriptor or socket) under the hood here, with this new API acting as a wrapper on top? If so, what happens if that underlying handle gets closed out from under it?…
Therefore, close() and deinit trap in debug builds if CloseHandle fails with .invalidHandle. FWIW, SwiftNIO hard-traps on EBADF/EFAULT and I think that's the right decision. Not doing so is hiding potentially very severe bugs. (Over a decade ago I worked on software where EBADF just errored and we accidentally sent customer data into a HTTP connection because a file descriptor got reused... Had we hard-trapped on EBADF, it's very very very likely we would've caught this issue early on in…
@beaumont Not sure what's the best move here but I do want to mention that there are lots of libraries that are still not on v5. These are only the Apple ones. I had an LLM dig through the repos: # apple/… · branch Now → proposed swift-crypto after swift package resolve 1 swift-nio-ssh · main "1.0.0"..<"5.0.0" → ..<"6.0.0" 5.0.3 2 swift-nio-oblivious-http · main from: "4.0.0" → "4.0.0"..<"6.0.0"; beta path → ..<"6.0.0-beta.max" 5.0.3 3 swift-cassandra-client · main "3.0.0"..<"5.0.0" →…
That’s all that’s on the table - changes that break preexisting code are very problematic at this point, and only accepted if the problem they solve is even worse
I am happy that kafka client is moving forward. Thank you! We have a fork of this client that moved quite away from the origin. One of the things that we eventually did differently was propagating events and messages through the single stream (or rather call) - that is very useful for synchronization, especially for rebalance events. That turned to be the most convenient API for us: synchronized, back pressured (by librdkafka) and performant at the same time. Plus EOFs for partitions. That is…
at least offering the option to add a label to the first closure would be something I appreciate very much.
Ah sorry, I wasn’t understanding clearly. You’re saying that even in the race case, if the closure is retained after the scope exits then we reliably trap? Then I’m back to asking, shouldn’t the documentation be updated to not claim that using withoutActuallyEscaping can cause UB?
Well, we can’t promise to diagnose the abstract violation of the rules, but we can diagnose the problem dynamically if it happens to occur in this execution. The current check — that there are no outstanding references to the function value on scope exit — should be enough for that, and I think that should be enough to make it safe. It would be safe regardless if the function isn’t @Sendable.
Then shouldn’t the function be marked @unsafe?
If a call to the closure races with the scope exit, then yeah, we cannot guarantee to diagnose the misuse; it is up to the vagaries of life whether the closure finishes executing before the scope exits.
I don't remember if I mentioned it at the time, but I'm definitely for this. Every now and then I try this and and am always disappointed that it doesn't work.
I mean that FlushFileBuffers blocks waiting for all writes to be committed to disk, so we don't want to call it in close(), which would cause serious performance degradation for common use cases. CloseHandle can block for some network/serial port edge cases I think, but it doesn't wait for a flush. So we should separate flush() and close() to make sure flushing is only used when it's really needed.
jrflat: Sure, I'll make it trap in all builds. jrflat: We also can't flush automatically in close() since FlushFileBuffers blocks waiting for the device to commit its cache (or on a pipe, for the reader to read everything). You mean close can't block or why? I thought it could!
FranzBusch: I noticed that the proposed APIs here are leaving open a race when trying to handle task priority: try await withContinuation(of: Int.self, throwing: IOError.self) { (continuation, awaiter) async throws(IOError) -> Int in let id = queue.submit( operation: operation, priority: Task.currentPriority, continuation: continuation ) return try await awaiter.wait( onCancel: { queue.cancel(id) }, onEscalate: { newPriority in queue.escalate(id, to: newPriority) } ) } Between the call to…
tera: Therefore, close() and deinit trap in debug builds if CloseHandle fails with .invalidHandle. Isn't it safer to trap in all builds? I worry that having debug and release configurations exercise different code paths could allow a critical production error to go unnoticed. Sure, I'll make it trap in all builds. .invalidHandle means someone misused the unsafe HANDLE APIs (closing a handle early or storing one that can't be closed), so as much as I don't like trapping in production, this seems…
allevato: Why wouldn't it? You are right, it feels unusual but could actually work.