soto-project / soto

Swift SDK for AWS that works on Linux, macOS and iOS
https://soto.codes
Apache License 2.0
882 stars 83 forks source link

Swift 6 warnings #730

Closed MahdiBM closed 4 weeks ago

MahdiBM commented 1 month ago

Describe the bug When building on swift:6.0-noble image, I get these warnings:

warning: 'soto': found 774 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/__w/my-app/my-app/.build/checkouts/soto/Sources/Soto/Services/RDSData/RDSData_api.swift
/__w/my-app/my-app/.build/checkouts/soto/Sources/Soto/Extensions/CognitoIdentity/CognitoIdentity+CredentialProvider.swift
/__w/my-app/my-app/.build/checkouts/soto/Sources/Soto/Services/Kinesis/Kinesis_shapes.swift
/__w/my-app/my-app/.build/checkouts/soto/Sources/Soto/Services/ElasticsearchService/ElasticsearchService_api.swift

To Reproduce Build on swift:6.0-noble

Expected behavior No warnings

Setup (please complete the following information):

Additional context

adam-fowler commented 1 month ago

This is not something specific to Swift 6. It's been around for years. It's a bug in SwiftPM that seems to be at the bottom of the pile.

Basically SwiftPM doesn't like the structure of Soto where a library can be spread across two folders and have other libraries folder structure interleaved with it. I specifically say in the manifest only look in these folders, but it still complains about files outside of them.

MahdiBM commented 1 month ago

Hmm perhaps Swift 6 is emitting the warning more prominently then. I can believe that it was already there even before Swift 6, and I just didn't notice it too much.

adam-fowler commented 1 month ago

It looks like this wasn't being reported for users of soto in v5.10 and earlier. It only appeared for developers of the package. This has changed in v6. I have mentioned this in the bug and hopefully we'll see some resolution. If not I'll be forced into merging #732 and creating another major release

MahdiBM commented 1 month ago

This doesn't seem to stop there, and I think it's a general issue with warnings propagation of dependency Package.swifts. I also see a bunch of these from other dependencies.

'swift-clocks': /.build/checkouts/swift-clocks/Package@swift-6.0.swift:5:15: warning: 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is deprecated: replaced by 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)'
 3 | import PackageDescription