devicekit / DeviceKit

DeviceKit is a value-type replacement of UIDevice.
MIT License
4.44k stars 433 forks source link

Can't update to DeviceKit v5.2.0 for SPM #380

Closed Semty closed 8 months ago

Semty commented 8 months ago

The cause, imo, is as follows:

PackageDescription.Target:63:24: note: 
'target(name:dependencies:path:exclude:sources:resources
:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)'
was introduced in PackageDescription 5.3

The other errors:

Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault
.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/qx/dfbjlysx2j78q78qjmtps_s00000gn/
T/TemporaryDirectory.0MFEgu/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/SharedFrameworks/
SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", 
"/Applications/Xcode.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", 
"-target", "arm64-apple-macos13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/
Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk", "-swift-version", "5", "-I", 
"/Applications/Xcode.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", 
"-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
/MacOSX14.2.sdk", "-package-description-version", "5.0.0", "-Xfrontend", "-serialize-diagnostics-path", 
"-Xfrontend", "/Users/user/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/devicekit.dia", 
"/Package.swift", "-disallow-use-new-driver", "-o", "/var/folders/qx/dfbjlysx2j78q78qjmtps_s00000gn/
T/TemporaryDirectory.e85c2w/devicekit-manifest"])
warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'
/Package.swift:33:10: error: 'target(name:dependencies:path:exclude:sources:resources
:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)' is unavailable
/Package.swift:39:10: error: 'testTarget(name:dependencies:path
:exclude:sources:resources:cSettings:cxxSettings:swiftSettings:linkerSettings:)' is unavailable
valentary commented 8 months ago

We've just started getting this today but with 5.1.0

valentary commented 8 months ago

If I open the package locally, the package does not resolve with errors:

Showing Recent Messages
/Package.swift/PackageDescription.Target:63:24: 'target(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)' was introduced in PackageDescription 5.3

I'm using XCode 15.2, but we get the issue on Bitrise as well, running 15.1

valentary commented 8 months ago

Can be fixed by updating swift-tools-version in Package.swift:

// swift-tools-version:5.7

valentary commented 8 months ago

We've just started getting this today but with 5.1.0

Seems this was caused by SPM not respecting the Package.resolved file in our CI

Emex4gman commented 8 months ago

Having the same issue.

codingiran commented 8 months ago

same issue +1

acosmicflamingo commented 8 months ago

Not trying to pile on, but same thing happened to me.

Faydee1220 commented 8 months ago

Can be fixed by updating swift-tools-version in Package.swift:

// swift-tools-version:5.7

@valentary How to update this?

acosmicflamingo commented 8 months ago

Mine is using 5.9, so I imagine the change has to occur here.

There is a PR that is open: https://github.com/devicekit/DeviceKit/pull/381. Maybe if we all collectively pray to the patron saint of computer programming, Saint Isidore of Seville, it can be merged very soon 🙏

Lutzifer commented 8 months ago

@Zandor300 A new hotfix release with this fix would be really useful for us SPM users 😃 If you need any testing done, just tell us.

artem-sherbachuk commented 8 months ago

need fix this issue urgent.

oronbz commented 8 months ago

For now, as a workaround, I suggest using an exact version to 5.1.0 on your Package.swift.