Commit 54b6113
fix: SPM manifest compilation on Swift 6.1 (#7819)
`String(cString:encoding:)` is a Foundation extension on `String`
and is not available in the SwiftPM manifest context, where only
`PackageDescription` is imported. On Swift 6.1 / Xcode 16+,
`swift package resolve` now fails with:
error: extra argument 'encoding' in call
Use the stdlib `String(cString:)` initializer, which already
decodes as UTF-8 and matches the original intent.
---------
Co-authored-by: SeungHyun Hong <whi7ehyun@gmail.com>1 parent 12f4d33 commit 54b6113
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments