kiliankoe / swift-outdated

A swift subcommand for displaying when your dependencies (SwiftPM or Xcode) are out of date
MIT License
342 stars 14 forks source link

Possible error with xcode13.3/swift 5.6 #13

Closed SeNeO closed 2 years ago

SeNeO commented 2 years ago

I have the follwoing error when I try to exectute swift-outdated that I didn't have previously as it was working correctly.

Error: keyNotFound(CodingKeys(stringValue: "object", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"object\", intValue: nil) (\"object\").", underlyingError: nil))

I have updated xcode to Xcode 13.3 between now and my last use of swift-outdated so it's probably related to this update. Am I missing something else?

kiliankoe commented 2 years ago

Good catch! Xcode 13.3 updated its serialized swift package description. I'll see about getting a fix out for this tomorrow in the coming days 😊

AF-cgi commented 2 years ago

The format of Package.resolved has changed with Xcode 13.3. Maybe you can check this @kiliankoe. While the Package.resolved JSON V2 format is quite similar to V1, the package field has been replaced with a similar identity field:

// Version 1
{
  "package": "AppCenter",
  "repositoryURL": "https://github.com/microsoft/appcenter-sdk-apple.git",
  "state": {
    "branch": null,
    "revision": "b84bc8a39ff04bc8d5ae7b4d230c171c562891aa",
    "version": "4.4.1"
  }
}

// Version 2
{
  "identity" : "appcenter-sdk-apple",
  "kind" : "remoteSourceControl",
  "location" : "https://github.com/microsoft/appcenter-sdk-apple.git",
  "state" : {
    "revision" : "b84bc8a39ff04bc8d5ae7b4d230c171c562891aa",
    "version" : "4.4.1"
  }
}
AF-cgi commented 2 years ago

@kiliankoe Look at the following PR #14.

alexanderpuchta commented 2 years ago

looks good. I am waiting for this solution because I am using this package in my projects. would be nice if you can release a new version @kiliankoe

kiliankoe commented 2 years ago

Thank you @AF-cgi for taking care of this! I had no idea the interest in this package was this high 😅 I just merged the changes and pushed a new tag for the homebrew update. Feel free to update 😊