Description
When building with Swift 6 on macOS 15 (new Foundation), the transitive dependency swift-configuration 1.2.0 fails to compile because it uses Data.bytes, which was removed in the new Foundation framework.
Error
error: value of type 'Data' has no member 'bytes'
FileProvider.swift:189:37
data: fileContents!.bytes,
Root cause
swift-configuration 1.2.0 (from Apple, dependency of console-kit → vapor) uses the deprecated Data.bytes property to convert Data to RawSpan:
self._snapshot = try snapshotType.init(
data: fileContents!.bytes,
providerName: providerName,
parsingOptions: parsingOptions
)
In the new Foundation (Swift 6 / macOS 15), Data.bytes no longer exists.
Workaround applied
In .github/workflows/tests.yml and .github/workflows/docs.yml we patch the file after dependency resolution:
sed -i '' 's/fileContents!\.bytes/fileContents!.withUnsafeBytes { RawSpan(_unsafeBytes: $0) }/g' \
.build/checkouts/swift-configuration/Sources/Configuration/Providers/Files/FileProvider.swift
Resolution needed
- Upstream fix in apple/swift-configuration
- Or update
console-kit / vapor to a version that no longer depends on swift-configuration (or depends on a fixed version)
Description
When building with Swift 6 on macOS 15 (new Foundation), the transitive dependency
swift-configuration1.2.0 fails to compile because it usesData.bytes, which was removed in the new Foundation framework.Error
Root cause
swift-configuration1.2.0 (from Apple, dependency ofconsole-kit→vapor) uses the deprecatedData.bytesproperty to convertDatatoRawSpan:In the new Foundation (Swift 6 / macOS 15),
Data.bytesno longer exists.Workaround applied
In
.github/workflows/tests.ymland.github/workflows/docs.ymlwe patch the file after dependency resolution:Resolution needed
console-kit/vaporto a version that no longer depends onswift-configuration(or depends on a fixed version)