# Core Libraries

**URL:** https://forums.swift.org/c/development/corelibs/8.md?page=3

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

**Page:** 4

---

## [CFRunLoop](https://forums.swift.org/t/cfrunloop/45009)

<div class="topic-metadata">

**Author:** [@3405691582](https://forums.swift.org/u/3405691582)\
**Replies:** 1\
**Last updated:** [February 23, 2021, 5:18am UTC](https://forums.swift.org/t/cfrunloop/45009 "2021-02-23T05:18:26Z")

</div>

Dispatch already patches over the various platform-specific event APIs, and most platforms are handled: kqueue-based BSD systems, epoll-based Linux systems, and Win32-based Windows systems. This is the case for CFRunLoop…

---

## [Proposal: swift-corelibs-foundation: Replace libcurl with SwiftNIO and AsyncHttpClient](https://forums.swift.org/t/proposal-swift-corelibs-foundation-replace-libcurl-with-swiftnio-and-asynchttpclient/44543)

<div class="topic-metadata">

**Author:** [@spevans](https://forums.swift.org/u/spevans)\
**Replies:** 8\
**Last updated:** [February 21, 2021, 10:40am UTC](https://forums.swift.org/t/proposal-swift-corelibs-foundation-replace-libcurl-with-swiftnio-and-asynchttpclient/44543 "2021-02-21T10:40:44Z")

</div>

\[cc @millenomi @Tony\_Parker\] Motivation The swift-corelibs-foundation's (scl-f) URLSession implementation for protocols http and ftp currently uses libcurl, provided by the host's package system or built separately as…

---

## [Swift ArgumentParser: Interactive mode Proposal](https://forums.swift.org/t/swift-argumentparser-interactive-mode-proposal/44762)

<div class="topic-metadata">

**Author:** [@kloun](https://forums.swift.org/u/kloun)\
**Replies:** 2\
**Last updated:** [February 15, 2021, 9:36pm UTC](https://forums.swift.org/t/swift-argumentparser-interactive-mode-proposal/44762 "2021-02-15T21:36:05Z")

</div>

Hello, mentors! I am Victor Kukshiev (cetjs2 in Freenode IRC), 2rd course student of PetrSU university, This project idea (Swift ArgumentParser: Interactive mode) is interesting and possible for me, I think. Could you …

---

## [XCTest is not testing a test methods defined in a generic subclass of XCTestCase](https://forums.swift.org/t/xctest-is-not-testing-a-test-methods-defined-in-a-generic-subclass-of-xctestcase/44695)

<div class="topic-metadata">

**Author:** [@blazej.sleboda](https://forums.swift.org/u/blazej.sleboda)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 8:23am UTC](https://forums.swift.org/t/xctest-is-not-testing-a-test-methods-defined-in-a-generic-subclass-of-xctestcase/44695 "2021-02-12T08:23:17Z")

</div>

Our team just discovered that Darwin's XCTest is not testing a test methods that are part of a test case which is a generic subclass of XCTestCase. Those methods are displayed in the Test Navigator and can be executed m…

---

## [How does KVO work in Operation](https://forums.swift.org/t/how-does-kvo-work-in-operation/44286)

<div class="topic-metadata">

**Author:** [@robin](https://forums.swift.org/u/robin)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 9:40pm UTC](https://forums.swift.org/t/how-does-kvo-work-in-operation/44286 "2021-01-29T21:40:22Z")

</div>

Hi, I have been trying to understand how KVO is really working in the Operation.swift. I checked out the swift-corelibs-foundation and saw this test case above (I have removed some test-related code). In the setIsReady…

---

## [File attributes unimplemented in Linux?](https://forums.swift.org/t/file-attributes-unimplemented-in-linux/43943)

<div class="topic-metadata">

**Author:** [@William\_Dillon2](https://forums.swift.org/u/William_Dillon2)\
**Replies:** 3\
**Last updated:** [January 18, 2021, 4:19pm UTC](https://forums.swift.org/t/file-attributes-unimplemented-in-linux/43943 "2021-01-18T16:19:37Z")

</div>

Hi All, I'm porting a Mac application that gets/sets file creation and modification dates via FileManager. I get an inscrutable thrown error in setAttributes (when the attributes dictionary is non-empty), and an empty …

---

## [KVO crash related with NSKeyValueObservation](https://forums.swift.org/t/kvo-crash-related-with-nskeyvalueobservation/42764)

<div class="topic-metadata">

**Author:** [@k-o-d-e-n](https://forums.swift.org/u/k-o-d-e-n)\
**Replies:** 0\
**Last updated:** [December 12, 2020, 7:19pm UTC](https://forums.swift.org/t/kvo-crash-related-with-nskeyvalueobservation/42764 "2020-12-12T19:19:37Z")

</div>

Some days ago I have got crash like this Environment: iPhone 5s with last iOS 12, Xcode 12. On simulator is likely ok. This happened when an observed object was deallocated, but NSKeyValueObservation.Helper still alive…

---

## [Dispatch seems to be slow compared to Java Executors](https://forums.swift.org/t/dispatch-seems-to-be-slow-compared-to-java-executors/42640)

<div class="topic-metadata">

**Author:** [@Haddock](https://forums.swift.org/u/Haddock)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 1:04pm UTC](https://forums.swift.org/t/dispatch-seems-to-be-slow-compared-to-java-executors/42640 "2020-12-09T13:04:24Z")

</div>

Hello, I recently had a look at how Swift is doing in the benchmark game compared to Java: Swift vs Java - Which programs are fastest? It seems striking that in the three last benchmarks k-nucleotide, regex-redux, bina…

---

## [Speeding up String's UTF8 parsing?](https://forums.swift.org/t/speeding-up-strings-utf8-parsing/42270)

<div class="topic-metadata">

**Author:** [@MrMage](https://forums.swift.org/u/MrMage)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 7:27pm UTC](https://forums.swift.org/t/speeding-up-strings-utf8-parsing/42270 "2020-11-25T19:27:53Z")

</div>

I recently came across Daniel Lemire's work on fast UTF8 validation. Given that Swift needs to UTF8-validate nearly every string that is e.g. read from a SQLite database, I was wondering whether it would be possible and …

---

## [Remainder/mod for Decimal](https://forums.swift.org/t/remainder-mod-for-decimal/40737)

<div class="topic-metadata">

**Author:** [@casperes1996](https://forums.swift.org/u/casperes1996)\
**Replies:** 2\
**Last updated:** [September 29, 2020, 11:06am UTC](https://forums.swift.org/t/remainder-mod-for-decimal/40737 "2020-09-29T11:06:20Z")

</div>

As it stands, there is, as far as I can tell, no modulo or remainder operator for the Decimal type. This seems incongruous with expectations from using floats, float80, double, etc. It's fairly easy to add with somethin…

---

## [Severe Decimal error in Foundation on Linux needs workaround](https://forums.swift.org/t/severe-decimal-error-in-foundation-on-linux-needs-workaround/14359)

<div class="topic-metadata">

**Author:** [@monagle](https://forums.swift.org/u/monagle)\
**Replies:** 9\
**Last updated:** [September 29, 2020, 1:12am UTC](https://forums.swift.org/t/severe-decimal-error-in-foundation-on-linux-needs-workaround/14359 "2020-09-29T01:12:52Z")

</div>

There is a serious bug in Decimal which causes incorrect results when adding and subtracting. The bug can be seen here It's been fixed and merged into the 4.2 branch, but that leaves many potential people running produc…

---

## [Alamofire, URLSessionTaskMetrics, and swift-corelibs-foundation](https://forums.swift.org/t/alamofire-urlsessiontaskmetrics-and-swift-corelibs-foundation/40547)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 9\
**Last updated:** [September 28, 2020, 5:02am UTC](https://forums.swift.org/t/alamofire-urlsessiontaskmetrics-and-swift-corelibs-foundation/40547 "2020-09-28T05:02:55Z")

</div>

Currently, the biggest blocker to porting Alamofire to Linux and now Windows is the non-existence of URLSessionTaskMetrics in swift-corelibs-foundation. Most of the other issues have been worked around in an experimental…

---

## [About starting to contribute into Swift](https://forums.swift.org/t/about-starting-to-contribute-into-swift/40399)

<div class="topic-metadata">

**Author:** [@fat.panda](https://forums.swift.org/u/fat.panda)\
**Replies:** 4\
**Last updated:** [September 18, 2020, 3:27pm UTC](https://forums.swift.org/t/about-starting-to-contribute-into-swift/40399 "2020-09-18T15:27:23Z")

</div>

Hello. I read in this post - On the road to Swift 6 - #91 by GetSwifty that Swift 6 would have its focus on concurrency (among other things) and has me excited. I have been noticing and playing around with Swift since v…

---

## [Swift Soars Ever Higher](https://forums.swift.org/t/swift-soars-ever-higher/34036)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 22\
**Last updated:** [April 2, 2020, 2:23am UTC](https://forums.swift.org/t/swift-soars-ever-higher/34036 "2020-04-02T02:23:03Z")

</div>

A year ago, to the day, I posted A Swift Takes Flight. In it, there was the announcement that Foundation was possible to build on Windows. This was a pretty large milestone in supporting Windows as a platform. Foundat…

---

## [Location of Network library?](https://forums.swift.org/t/location-of-network-library/40210)

<div class="topic-metadata">

**Author:** [@solidak](https://forums.swift.org/u/solidak)\
**Replies:** 3\
**Last updated:** [September 17, 2020, 9:18am UTC](https://forums.swift.org/t/location-of-network-library/40210 "2020-09-17T09:18:56Z")

</div>

Silly question, but where's the location of the Network library? It used to be located in stdlib/public/Darwin (see old commit). Where's it now? Some context: I'd like a dump of all the function signatures in the stdli…

---

## [Where to Report Bugs?](https://forums.swift.org/t/where-to-report-bugs/40176)

<div class="topic-metadata">

**Author:** [@NPAssoc](https://forums.swift.org/u/NPAssoc)\
**Replies:** 1\
**Last updated:** [September 11, 2020, 8:07pm UTC](https://forums.swift.org/t/where-to-report-bugs/40176 "2020-09-11T20:07:03Z")

</div>

I've reported 4 bugs at bugs.swift.org, SR-13300, SR-13270, SR-13222, 13204 mid July '20. All are library related. I have not seen any response on them. Is that the best place to report bugs? — Nick

---

## [Thread Naming Doesn't Work on Linux](https://forums.swift.org/t/thread-naming-doesnt-work-on-linux/40071)

<div class="topic-metadata">

**Author:** [@xanderdunn](https://forums.swift.org/u/xanderdunn)\
**Replies:** 2\
**Last updated:** [September 8, 2020, 6:08pm UTC](https://forums.swift.org/t/thread-naming-doesnt-work-on-linux/40071 "2020-09-08T18:08:53Z")

</div>

Code snippet to reproduce: #!/usr/bin/env swift import Foundation class MyThread: Thread { let extraParameter: Int init(extraParameter: Int) { self.extraParameter = extraParameter …

---

## [Combine: Wrapped async call with Future, but Future.sink doesn't appear to complete](https://forums.swift.org/t/combine-wrapped-async-call-with-future-but-future-sink-doesnt-appear-to-complete/39953)

<div class="topic-metadata">

**Author:** [@jeromeInTheHouse](https://forums.swift.org/u/jeromeInTheHouse)\
**Replies:** 2\
**Last updated:** [September 2, 2020, 2:40pm UTC](https://forums.swift.org/t/combine-wrapped-async-call-with-future-but-future-sink-doesnt-appear-to-complete/39953 "2020-09-02T14:40:32Z")

</div>

First-time poster, long-time reader ... I've wrapped an async call to the Firebase Authorization API. I'm calling it from inside a SwiftUI View function. func authenticateFirebaseEmail(email: String, password: String)…

---

## [Inexplicable Behaviour Difference](https://forums.swift.org/t/inexplicable-behaviour-difference/39713)

<div class="topic-metadata">

**Author:** [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Replies:** 3\
**Last updated:** [August 26, 2020, 12:44am UTC](https://forums.swift.org/t/inexplicable-behaviour-difference/39713 "2020-08-26T00:44:14Z")

</div>

Can someone confirm for me that I’m not losing my mind? It seems like the exact same code does two different things, and I cannot understand why. Does anyone else observe the same when you do this? (I’m on macOS 10.15.6 …

---

## [An Onscreen Keyboard App for Learning Arabic](https://forums.swift.org/t/an-onscreen-keyboard-app-for-learning-arabic/38495)

<div class="topic-metadata">

**Author:** [@Jellz](https://forums.swift.org/u/Jellz)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 10:33pm UTC](https://forums.swift.org/t/an-onscreen-keyboard-app-for-learning-arabic/38495 "2020-07-16T22:33:20Z")

</div>

I am a complete beginner in iOS app development and would like to learn how to use Swift to design an app. (Not sure if this is the correct thread to post in) any advice on how to achieve the following? Users would se…

---

## [Process.run unrecoverable error](https://forums.swift.org/t/process-run-unrecoverable-error/37983)

<div class="topic-metadata">

**Author:** [@jnordberg](https://forums.swift.org/u/jnordberg)\
**Replies:** 3\
**Last updated:** [June 29, 2020, 1:58pm UTC](https://forums.swift.org/t/process-run-unrecoverable-error/37983 "2020-06-29T13:58:57Z")

</div>

I have a long running process on linux that periodically launches a child process using Process, it looks something like this: func doThing() throws -\> Data { let process = Process() process.executableURL = URL(…

---

## [CVarArg support for NSString and String](https://forums.swift.org/t/cvararg-support-for-nsstring-and-string/37404)

<div class="topic-metadata">

**Author:** [@Molanda](https://forums.swift.org/u/Molanda)\
**Replies:** 1\
**Last updated:** [June 11, 2020, 6:09am UTC](https://forums.swift.org/t/cvararg-support-for-nsstring-and-string/37404 "2020-06-11T06:09:27Z")

</div>

I created PR #2821 to add CVarArg support to NSString and String. This is something I use on my Android app for localized strings, which are shared from the iOS version. It has also been reported as SR-957. Adding su…

---

## [Data.replaceSubrange crashes on devices 32 bits](https://forums.swift.org/t/data-replacesubrange-crashes-on-devices-32-bits/37236)

<div class="topic-metadata">

**Author:** [@nghiahoangdev](https://forums.swift.org/u/nghiahoangdev)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 3:21pm UTC](https://forums.swift.org/t/data-replacesubrange-crashes-on-devices-32-bits/37236 "2020-06-05T15:21:32Z")

</div>

Steps to reproduce: Environment: Latest Swift (happens on earlier version as well), Xcode version, device 32 bits. var data = Data.init(count: 837933) // count is larger than Int16.max data.removeSubrange(0..\<8343…

---

## [Foundation API surface ("hitlist") now available](https://forums.swift.org/t/foundation-api-surface-hitlist-now-available/36465)

<div class="topic-metadata">

**Author:** [@millenomi](https://forums.swift.org/u/millenomi)\
**Replies:** 7\
**Last updated:** [May 19, 2020, 6:58pm UTC](https://forums.swift.org/t/foundation-api-surface-hitlist-now-available/36465 "2020-05-19T18:58:27Z")

</div>

Just a quick note here that I just merged a document in the Docs directory of swift-corelibs-foundation's repository that contains the full API surface of Foundation, with tags on whether they are expected to be in swift…

---

## [Foundation now aligned to macOS Catalina](https://forums.swift.org/t/foundation-now-aligned-to-macos-catalina/36305)

<div class="topic-metadata">

**Author:** [@millenomi](https://forums.swift.org/u/millenomi)\
**Replies:** 12\
**Last updated:** [May 13, 2020, 4:40pm UTC](https://forums.swift.org/t/foundation-now-aligned-to-macos-catalina/36305 "2020-05-13T16:40:59Z")

</div>

With the commit of the Catalina merge into 5.3, swift-corelibs-foundation is now more closely aligned to the behavior and functionality of macOS Catalina. (Up until 5.2, it was aligned to macOS Mojave.) I wanted to highl…

---

## [How to export Foundation built from source on Linux?](https://forums.swift.org/t/how-to-export-foundation-built-from-source-on-linux/36221)

<div class="topic-metadata">

**Author:** [@augusto2112](https://forums.swift.org/u/augusto2112)\
**Replies:** 18\
**Last updated:** [May 7, 2020, 11:56pm UTC](https://forums.swift.org/t/how-to-export-foundation-built-from-source-on-linux/36221 "2020-05-07T23:56:43Z")

</div>

I'm trying to run LLDB's tests, but those that depend on Foundation are failing. I've built Swift with the command: utils/build-script --libicu --lldb --foundation I've found instructions for building Foundation on …

---

## [Combine nested publishers leak](https://forums.swift.org/t/combine-nested-publishers-leak/34779)

<div class="topic-metadata">

**Author:** [@\_vladi](https://forums.swift.org/u/_vladi)\
**Replies:** 15\
**Last updated:** [April 17, 2020, 5:01pm UTC](https://forums.swift.org/t/combine-nested-publishers-leak/34779 "2020-04-17T17:01:14Z")

</div>

Hello Swift Community, After working some time with the brand new Combine framework I lately hit some issue that really gave me and my team some really hard times to figure out. I haven't found anything related to this …

---

## [Base64 performance regression in Swift 5.2 on Linux](https://forums.swift.org/t/base64-performance-regression-in-swift-5-2-on-linux/34861)

<div class="topic-metadata">

**Author:** [@fabianfett](https://forums.swift.org/u/fabianfett)\
**Replies:** 14\
**Last updated:** [March 30, 2020, 10:17pm UTC](https://forums.swift.org/t/base64-performance-regression-in-swift-5-2-on-linux/34861 "2020-03-30T22:17:39Z")

</div>

Hi, being the developer of swift-base64-kit I monitor base64 performance quite closely. Especially on Linux. For testing I use the official swift Docker images (5.1.5 and 5.2). My (very simple) script for testing the p…

---

## [Using Dispatch Internals for Testing](https://forums.swift.org/t/using-dispatch-internals-for-testing/34769)

<div class="topic-metadata">

**Author:** [@SlaunchaMan](https://forums.swift.org/u/SlaunchaMan)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 9:07am UTC](https://forums.swift.org/t/using-dispatch-internals-for-testing/34769 "2020-03-25T09:07:33Z")

</div>

After the release of my ErrorAssertions package that allows you to write tests around places your code calls fatalError() and friends, I turned my attention to another assertion method in Swift: Dispatch’s dispatchPrecon…

---

## [Is it ready that StrideTo and StrideThrough structs conform to RandomAccessCollection?](https://forums.swift.org/t/is-it-ready-that-strideto-and-stridethrough-structs-conform-to-randomaccesscollection/34634)

<div class="topic-metadata">

**Author:** [@SusanCheng](https://forums.swift.org/u/SusanCheng)\
**Replies:** 1\
**Last updated:** [March 19, 2020, 10:24am UTC](https://forums.swift.org/t/is-it-ready-that-strideto-and-stridethrough-structs-conform-to-randomaccesscollection/34634 "2020-03-19T10:24:00Z")

</div>

The FIXME say that was due to the bug of SR-6474 and the bug was fixed in 2018.

[Previous page](https://forums.swift.org/c/development/corelibs/8.md?page=2)

[Next page](https://forums.swift.org/c/development/corelibs/8.md?page=4)
