You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce ICUExport: a command utility that upgrades the ICU version for the swift-foundation-icu, based on ICU releases from apple-oss-distribution (#81)
A utility that upgrades the ICU version for the [swift-foundation-icu](https://github.com/swiftlang/swift-foundation-icu) repository.
4
+
5
+
## Usage
6
+
7
+
`icu-export` performs a merge between the existing `swift-foundation-icu` and the upgraded `ICU` repository to extract relevant files from each. To start, first clone the two repositories:
swift run icu-export -i /path/to/ICU -s /path/to/swift-foundation-icu -o /output/path
18
+
```
19
+
20
+
`icu-export` will create a directory `SwiftFoundationICU` under `/output/path` that contains the newly updated ICU.
21
+
22
+
—
23
+
### Known Limitations
24
+
25
+
Depending on the changes made to each ICU upgrade, `icu-export` may fail to apply the patches in `Sources/Patches`. In such cases, please manually apply the changes.
Subject: [PATCH 1/2] Hide all ICU public C++ Symbols
5
+
6
+
**Rationale:** When FoundationInternationalization tests are executed, we effectively load two ICU instances into memory: 1) The system ICU loaded by XCTest via system Foundation; 2) The package ICU SwiftFoundation utilizes.
7
+
8
+
These two ICUs cause symbol collisions for dyld due to the fact that all public C++ symbols share a global namespace and coalesce across all loaded dylibs. Consequently, we encounter sporadic test failures in SwiftFoundation as dyld arbitrarily selects ICU symbols and occasionally chooses the system one.
9
+
10
+
To address this issue, we resolved to hide all C++ APIs, ensuring they are not weakly referenced and potentially bound to the system ICU implementation. This solution proves effective for SwiftFoundation, as it does not actually utilize the C++ APIs.
0 commit comments