Page MenuHomePhabricator

Refactor remaining delegate networking to block based approach.
Closed, InvalidPublic

Description

Specifically, all fetchers inheriting from "FetcherBase", which needs to die :)

We could then also remove the "QueuesSingleton".

A similar process was undertaken recently for all of the authentication fetchers, which were Swift-ified as well.

Event Timeline

Also, when refactoring the old auth networking code, I noticed some of the error handling was especially wonky...

Not every failure returned an error. That is, sometimes delegates were told something succeeded, but the delegate ended up doing logic which determined actually the fetch hadn't succeeded. Leaky abstraction bla bla bla.

To enforce better error handling discipline on myself while refactoring I made the new fetchers invoke "success" blocks rather than "completion" blocks - I felt "success" made clear that not only had the fetch completed but it had actually succeeded in fetching what it was supposed to. All non-success outcomes were then given explicit errors for "failure" block invocation.

I wound up Swift-ifiying all of the auth view controllers during the refactor too.

I'd be willing to take on the remaining delegate bits in the editing workflow.

We've gradually updated lots of these fetcher bits, so this ticket can be closed.