Skip to content

Nuke 6.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@kean kean released this 27 Nov 14:54
· 2598 commits to main since this release

About 8 months ago I started using Nuke in production. The project has matured from being a playground for experimenting with Swift features to something that I rely on in my day job. The primary goal behind Nuke 6 is to simplify the project even further and to get rid of the implementation details leaking into a public API.

Nuke is now Swift 4 only. It's simpler, smaller (< 1000 lines of code), and faster. It features progress reporting and makes it simpler to create custom data loader (e.g. Alamofire data loader).

Features

  • Implements progress reporting #81

Removed APIs

  • Remove global loadImage(...) functions #142
  • Remove Deduplicator class, make this functionality part of Loader. This has a number of benefits: reduced API surface, improves performance by reducing number of queue switching, enables new features like progress reporting.
  • Remove schedulers (DispatchQueueScheduler, OperationQueueScheduler, etc). This whole infrastructure was way too excessive.
  • Make RateLimiter private.

Improvements

  • Replace Foundation.OperationQueue & custom Foundation.Operation subclass with a new TaskQueue type. It's simpler, faster, and gets rid of pesky Thread Sanitizer warnings #141
  • DataLoader now works with URLRequest, not Request
  • Loader now always calls completion on the main thread.
  • Move URLResponse validation from DataDecoder to DataLoader
  • Make use of some Swift 4 feature like nested types inside generic types.