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
When importing a package which contains dash in the library name, they are automatically replaced by the Xcode build system to underscores, which breaks the dependency resolving and makes them unusable.
'test' /Users/Philip/Library/Developer/swift-sh.cache/1f801762d2aba590bc4b77b62e521b02: error: product 'AppStoreConnect_Swift_SDK' not found in package 'appstoreconnect-swift-sdk'. it is required by package 'test' target 'test'.
warning: dependency 'AppStoreConnect-Swift-SDK' is not used by any target
error: 1 <(/usr/bin/swift build -Xswiftc -suppress-warnings)
Minimal Example to reproduce:
#!/usr/bin/swift sh
import AppStoreConnect_Swift_SDK // AvdLee/appstoreconnect-swift-sdk
Ideas to fix the issue:
add option to define the product name, e.g.
#!/usr/bin/swift sh
import AppStoreConnect_Swift_SDK // AvdLee/appstoreconnect-swift-sdk#appstoreconnect-swift-sdk
inform package authors about the name-convention breaking and provide a duplicated target, e.g.
When importing a package which contains dash in the library name, they are automatically replaced by the Xcode build system to underscores, which breaks the dependency resolving and makes them unusable.
Example: the package AppStoreConnect-Swift-SDK by @AvdLee
The product name is defined in the Package.swift as the following:
which requires the import to be the following:
as dashes are automatically replaced with
_
.This results in the following error:
Minimal Example to reproduce:
#!/usr/bin/swift sh import AppStoreConnect_Swift_SDK // AvdLee/appstoreconnect-swift-sdk
Ideas to fix the issue:
#!/usr/bin/swift sh import AppStoreConnect_Swift_SDK // AvdLee/appstoreconnect-swift-sdk#appstoreconnect-swift-sdk
The text was updated successfully, but these errors were encountered: