thoughtbot/Argo

Upgrade to version 5.0.0 blocked due to Ogra library

NoaD opened this issue · 6 comments

NoaD commented

I'm a novice iOS developer and I have to handle some legacy code.
I'm trying to upgrade Argo version 4.1.2 to version 5.0.0 but the upgrade is blocked b/c that code is also using the Ogra library that is dependent on Argo version 4.1.2

It looks like this library wan't handled in a while and I was wondering if you might have some recommendation for alternatives.

Error Messages

[!] CocoaPods could not find compatible versions for pod "Argo":
 In Podfile:
    Argo (~> 5.0.0)

 Ogra (~> 4.1.2) was resolved to 4.1.2, which depends on
  Argo (= 4.1.2)

Argo Version

Argo 5.0.0

Dependency Manager

Cocoapods

Hi! Short of replacing Argo/Ogra with something like Codable, the only way to move forward is going to be to get a new release of Ogra that points to 5.0 instead of 4.1.2. Unfortunately I don't control Ogra, and so can't help get it updated. Maybe @edwardaux can lend a hand here?

@NoaD Yeah, sorry, I haven't really touched/used Ogra since Codable was released.

Sadly, I just don't have the bandwidth at the moment to invest in upgrading Ogra. The good news, though, is that there really isn't that much code in the Ogra project. Essentially, it is just contained within one file: https://github.com/edwardaux/Ogra/blob/master/Sources/Encodable.swift

My suggestion would be to remove Ogra from your dependency list and just pull in Argo 5.0 directly. Then copy the contents of the file I referenced above into your project. I'm sure there's going to be some Swift 5/Argo 5 fixes you'll have to make, but the Ogra footprint is relatively small.

Sorry, I wish I had a better story for you 😢

NoaD commented

It's a preference thing, really. Argo is definitely an opinionated dependency, and is outside the norm for typical Swift development these days. It was built in a time where this was a real problem that needed solving, and might not be as big a step forward now that Codable exists. I still do think that Argo does some things better than Codable (in particular, it has better error handling IMO), but if someone were to choose Codable over Argo (or migrate from Argo to Codable in an existing codebase) that wouldn't seem odd to me.

I also just haven't had time/energy to do much to pull Argo forward over the past few years. I don't use it in my day to day work anymore, and so it's fairly stagnant as a project. It still does what it intends to do, and I had ideas for how we could broaden the appeal and improve the API, but it's unlikely to get much active development moving forward unless someone else steps in.

NoaD commented

I'm going to go ahead and close this issue, but do feel free to re-open it or open a new issue if you need any more help.