apple/cups 1294
Apple CUPS Sources
apple/swift-crypto 1053
Open-source implementation of a substantial portion of the API of Apple CryptoKit suitable for use on Linux platforms.
An HTTP/2 APNS library built on swift-nio
swift-server/swift-backtrace 224
💥 Backtraces for Swift on Linux and Windows
SwiftNIO SSH is a programmatic implementation of SSH using SwiftNIO
WebGL-based rendering engine for Scratch 3.0
Client side Prometheus library in Swift
Non-blocking, event-driven Swift client for Redis.
LLK/s2forums 19
This is a fork of DjangoBB customized for Scratch 2.0. DjangoBB is a quick and simple forum which uses the Django Framework (written in Python language). Abbreviation DjangoBB stands for Django Bulletin Board. DjangoBB is distributed under the BSD license.
Translations for the Scratch 2.0 website
Pull request review commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
func main() async { print(", response:", String(buffer: response2.body ?? ByteBuffer())) try await channel.close()++ try await group.shutdownGracefully()
This patch isn't quite right as we now shut the loop down twice. Can you move the existing event loop construction out of the top-level scope and into this async function instead?
comment created time in 7 minutes
Pull request review commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
extension EventLoopFuture { } } +extension EventLoopGroup {+ /// Shuts down the event loop gracefully.+ @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)+ @inlinable+ public func shutdownGracefully() async throws {+ return try await withCheckedThrowingContinuation { cont in+ self.shutdownGracefully { error in+ if let error = error {+ cont.resume(throwing: error)+ }+ cont.resume()
Continuations must be resumed exactly once: this will fail in the event we hit the error path, as we'll resume twice.
comment created time in 6 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
pull request commentapple/swift-nio
Add async implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency
Can one of the admins verify this patch?
comment created time in 8 minutes
PR opened apple/swift-nio
Adds a new extension to EventLoopGroup in _NIOConcurrency to provide an asynchronous shutdownGracefully().
Motivation
Shutting down an event loop was special because it used a completion handler and executed on a DispatchQueue because there would be no event loop to use an EventLoopFuture.
Now we have the new Swift concurrency features, we can provide an async shutdownGracefully.
Fixes #1878.
Modifications
Adds EventLoopGroup.shutdownGracefully() async and some code to use it in NIOAsyncAwaitDemo.
There's no obvious way to ask an ELG if it has been shutdown but I made the following local-only changes to verify that this performs as expected:
diff --git a/Sources/NIO/EventLoop.swift b/Sources/NIO/EventLoop.swift
index d18a33dd..972b3b05 100644
--- a/Sources/NIO/EventLoop.swift
+++ b/Sources/NIO/EventLoop.swift
@@ -840 +840 @@ public final class MultiThreadedEventLoopGroup: EventLoopGroup {
- private enum RunState {
+ public enum RunState {
@@ -852 +852 @@ public final class MultiThreadedEventLoopGroup: EventLoopGroup {
- private var runState: RunState = .running
+ public var runState: RunState = .running
diff --git a/Sources/NIOAsyncAwaitDemo/main.swift b/Sources/NIOAsyncAwaitDemo/main.swift
index 97a9c0c3..f8b29ace 100644
--- a/Sources/NIOAsyncAwaitDemo/main.swift
+++ b/Sources/NIOAsyncAwaitDemo/main.swift
@@ -60,0 +61 @@ func main() async {
+ print("elg state: \(group.runState)") // .running
@@ -61,0 +63,7 @@ func main() async {
+ print("elg state: \(group.runState)") // .closed(nil)
+
+ /// This causes the following error:
+ /// ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
+ group.next().execute {
+ print("This will not execute.")
+ }
pr created time in 8 minutes
pull request commentapple/swift-collections
Add a priority queue implementation built on top of a min-max heap
I just spent a little time profiling a bit (as the benchmark runtime seems quite long compared to the C++ version referenced in the article linked to previously), there seems to be an issue with using swapAt: (probably the same issue discussed here) - I just did a simple measurement of PriorityQueue<Int> insert and could see around 7.5M transient allocations. Doing the simple change of manually doing the swapAt: like this in all places:
storage.swapAt(largestDescendantIdx, index)
changed to
let tmp = storage[index]
storage[index] = storage[largestDescendantIdx]
storage[largestDescendantIdx] = tmp
brought this test down to 165K transient allocations and the runtime was basically halved.
And the original benchmark went from:

to:

Not sure if this is a known issue with the swapAt: method, but it seems a bit rough to force two memory allocations per swapAt: operation for a simple small value type.
Also, looking at the removeMax test, there is also a large amount of transient allocations with this backtrace, can't quite understand why though (haven't looked at any others yet).

comment created time in 18 minutes
push eventSwiftPackageIndex/SwiftPackageIndex-Server
commit sha 622e9e1248aa992c916175670e2c554fe63c1819
Add swift-tools-support-core
commit sha cb6e707ebdb1c625326b27339bbff4bded193c0c
Revert "Add swift-tools-support-core" This reverts commit 622e9e1248aa992c916175670e2c554fe63c1819. We don't want to include this dependency, because it requires sqlite as a build dependency.
commit sha b33a1a7e106b59b251c8f882789552f072aa85be
Fill in moduleName via c99 target name mangling
commit sha 7e3b4cbc60927117f7289b586f4eaf75afdf80d1
Merge pull request #1171 from SwiftPackageIndex/fix-collections-module-name Fix collections module name
commit sha 8d47b3afdd61ca7e1a8434fcc8407bd994e302d3
Update manifest
commit sha b98b14a86c5770586a09a238da5777a2c7d43659
Converted `ReconcileCommand` to async/await
commit sha 3ee726fa756501af95ae99b7ee3f4eaebd4f5128
Whitespace
commit sha f7f55748f5f55e63ab97b001b18a2e726c5bae5a
Use async let
commit sha bcb7125457e551fe7380c6400198191fa0e60cc5
Fix async run
commit sha 02b88886b58e5139d2e695513c8ee71ed86f4649
Promise-based version
push time in 25 minutes
push eventSwiftPackageIndex/SwiftPackageIndex-Server
commit sha 622e9e1248aa992c916175670e2c554fe63c1819
Add swift-tools-support-core
commit sha cb6e707ebdb1c625326b27339bbff4bded193c0c
Revert "Add swift-tools-support-core" This reverts commit 622e9e1248aa992c916175670e2c554fe63c1819. We don't want to include this dependency, because it requires sqlite as a build dependency.
commit sha b33a1a7e106b59b251c8f882789552f072aa85be
Fill in moduleName via c99 target name mangling
commit sha 7e3b4cbc60927117f7289b586f4eaf75afdf80d1
Merge pull request #1171 from SwiftPackageIndex/fix-collections-module-name Fix collections module name
push time in 27 minutes
delete branch SwiftPackageIndex/SwiftPackageIndex-Server
delete branch : fix-collections-module-name
delete time in 27 minutes
PR merged SwiftPackageIndex/SwiftPackageIndex-Server
Fixes #1169
Open questions:
- [x] is it ok to include
StringMangling.swift? (Adding TSC as a dependency would force us to include sqlite dev dependency into Linux base images) - [x] do we need to careful which target names we supply or do we need to determine module "importability" somehow? If so, how?
cc @neonacho @yim-lee
pr closed time in 27 minutes
issue closedSwiftPackageIndex/SwiftPackageIndex-Server
Include `moduleName` in package collections
@neonacho via Slack:
I think there is a small bug around modules, what I see in the generated collection is this:
"targets": [ { "name": "CombineSchedulers" }, { "name": "CombineSchedulersTests" } ]In the collections we generate, there is an additional "moduleName" property that we rely on for autocompletion in Xcode.
Would be possible for y’all to add that attribute when generating your collections?
closed time in 27 minutes
finestructureissue commentSwiftPackageIndex/SwiftPackageIndex-Server
Replace `swift package dump-package` with `swift package describe --type json`
As part of this issue, make sure to migrate the changes made in #1171 over to use data from describe.
comment created time in 27 minutes
issue openedSwiftPackageIndex/SwiftPackageIndex-Server
Replace `swift package dump-package` with `swift package describe --type json`
describe is going to replace dump-package in the future and has more information. For instance c99name and module_membership, which we need for package collections.
created time in 31 minutes
created tagapple/sourcekit-lsp
Language Server Protocol implementation for Swift and C-based languages
created time in an hour
created tagapple/swift-tools-support-core
Contains common infrastructural code for both SwiftPM and llbuild.
created time in an hour
created tagapple/swift-driver
Swift compiler driver reimplementation in Swift
created time in an hour
created tagapple/indexstore-db
Index database library for use with sourcekit-lsp
created time in an hour