Open sebsto opened 2 weeks ago
I found a workaround. This behaviour seems to be triggered by the name of the directory.
➜ Soto pwd
/Users/stormacq/Desktop/Soto
➜ Soto swift build
error: 'soto': product 'SotoS3' required by package 'soto' target 'SotoExample' not found in package 'soto'.
Then
➜ Soto cd ..
➜ Desktop mv Soto SotoS3
➜ Desktop cd SotoS3/
➜ SotoS3 rm -rf .build
➜ SotoS3 swift build
....
Build complete! (89.44s)
Actually, when the project directory name is identical as the name of the package, SPM fails
➜ Desktop mv Soto swift-aws-lambda-runtime
➜ Desktop cd swift-aws-lambda-runtime/
➜ swift-aws-lambda-runtime swift build
Fetching https://github.com/soto-project/soto.git from cache
Fetched https://github.com/soto-project/soto.git from cache (0.07s)
Creating working copy for https://github.com/soto-project/soto.git
Working copy of https://github.com/soto-project/soto.git resolved at 7.0.0
Removing https://github.com/swift-server/swift-aws-lambda-runtime.git
error: 'swift-aws-lambda-runtime': product 'AWSLambdaRuntime' required by package 'swift-aws-lambda-runtime' target 'SotoExample' not found in package 'swift-aws-lambda-runtime'. Did you mean 'AWSLambdaEvents'?
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
I'm creating a very simple project using Soto and the Swift Runtime for AWS Lambda as dependencies. When trying to build, I receive this :
To try to start from a clean situation:
~/Library/org.swift.swiftpm
and~/Library/Caches/org.swift.swiftpm
~/.swiftpm
Expected behavior
Build should work
Actual behavior
Build fails with
Steps to reproduce
To reproduce that problem, be sure to name your project directory exactly as the library you're importing. In this example, I use the
soto
librarySwift Package Manager version/commit hash
Apple Swift version 6.0.1 (swift-6.0.1-RELEASE)
Swift & OS version (output of
swift --version ; uname -a
)Apple Swift version 6.0.1 (swift-6.0.1-RELEASE) Target: arm64-apple-macosx15.0 Darwin bcd07458a91c 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64