Skip to content

Commit a01e740

Browse files
authored
Merge branch 'main' into progressive-jpeg-decode
2 parents af5356b + 6c5ae03 commit a01e740

File tree

172 files changed

+2192
-2716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+2192
-2716
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
name: "Nuke CI"
22

3-
on:
3+
on:
44
push:
5-
branches:
5+
branches:
66
- main
77
pull_request:
8-
branches:
8+
branches:
99
- '*'
1010

1111
jobs:
1212
ios-latest:
13-
name: Unit Tests (iOS 17.4, Xcode 15.3)
14-
runs-on: macOS-14
13+
name: Unit Tests (iOS 26.2, Xcode 26.2)
14+
runs-on: macOS-26
1515
env:
16-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
16+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Run Tests
2020
run: |
21-
.scripts/test.sh -s "Nuke" -d "OS=17.4,name=iPhone 15 Pro"
22-
.scripts/test.sh -s "NukeUI" -d "OS=17.4,name=iPhone 15 Pro"
23-
.scripts/test.sh -s "NukeExtensions" -d "OS=17.4,name=iPhone 15 Pro"
21+
.scripts/test.sh -s "Nuke" -d "OS=26.2,name=iPhone 17 Pro"
22+
.scripts/test.sh -s "NukeUI" -d "OS=26.2,name=iPhone 17 Pro"
23+
.scripts/test.sh -s "NukeExtensions" -d "OS=26.2,name=iPhone 17 Pro"
2424
macos-latest:
25-
name: Unit Tests (macOS, Xcode 15.3)
26-
runs-on: macOS-14
25+
name: Unit Tests (macOS, Xcode 26.2)
26+
runs-on: macOS-26
2727
env:
28-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
28+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
2929
steps:
3030
- uses: actions/checkout@v2
3131
- name: Run Tests
@@ -34,17 +34,17 @@ jobs:
3434
.scripts/test.sh -s "NukeUI" -d "platform=macOS"
3535
.scripts/test.sh -s "NukeExtensions" -d "platform=macOS"
3636
tvos-latest:
37-
name: Unit Tests (tvOS 17.4, Xcode 15.3)
38-
runs-on: macOS-14
37+
name: Unit Tests (tvOS 26.2, Xcode 26.2)
38+
runs-on: macOS-26
3939
env:
40-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
40+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
4141
steps:
4242
- uses: actions/checkout@v2
4343
- name: Run Tests
4444
run: |
45-
.scripts/test.sh -s "Nuke" -d "OS=17.4,name=Apple TV"
46-
.scripts/test.sh -s "NukeUI" -d "OS=17.4,name=Apple TV"
47-
.scripts/test.sh -s "NukeExtensions" -d "OS=17.4,name=Apple TV"
45+
.scripts/test.sh -s "Nuke" -d "OS=26.2,name=Apple TV"
46+
.scripts/test.sh -s "NukeUI" -d "OS=26.2,name=Apple TV"
47+
.scripts/test.sh -s "NukeExtensions" -d "OS=26.2,name=Apple TV"
4848
# There is a problem with watchOS runners where they often fail to launch on CI
4949
#
5050
# watchos-latest:
@@ -58,28 +58,31 @@ jobs:
5858
# run: |
5959
# .scripts/test.sh -s "Nuke" -d "OS=9.1,name=Apple Watch Series 8 (45mm)"
6060
# .scripts/test.sh -s "NukeUI" -d "OS=9.1,name=Apple Watch Series 8 (45mm)"
61-
# .scripts/test.sh -s "Nuke Extensions" -d "OS=9.1,name=Apple Watch Series 8 (45mm)"
62-
ios-xcode-14-3-1:
63-
name: Unit Tests (iOS 17.0, Xcode 15.0)
64-
runs-on: macOS-13
65-
env:
66-
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
67-
steps:
68-
- uses: actions/checkout@v2
69-
- name: Run Tests
70-
run: |
71-
.scripts/test.sh -s "Nuke" -d "OS=17.0,name=iPhone 15 Pro"
72-
.scripts/test.sh -s "NukeUI" -d "OS=17.0,name=iPhone 15 Pro"
73-
.scripts/test.sh -s "NukeExtensions" -d "OS=17.0,name=iPhone 15 Pro"
61+
# .scripts/test.sh -s "NukeExtensions" -d "OS=9.1,name=Apple Watch Series 8 (45mm)"
62+
63+
# Nuke 13.0 supports only the latest version of Xcode (16).
64+
#
65+
# ios-xcode-14-3-1:
66+
# name: Unit Tests (iOS 17.0, Xcode 15.0)
67+
# runs-on: macOS-13
68+
# env:
69+
# DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
70+
# steps:
71+
# - uses: actions/checkout@v2
72+
# - name: Run Tests
73+
# run: |
74+
# .scripts/test.sh -s "Nuke" -d "OS=17.0,name=iPhone 15 Pro"
75+
# .scripts/test.sh -s "NukeUI" -d "OS=17.0,name=iPhone 15 Pro"
76+
# .scripts/test.sh -s "NukeExtensions" -d "OS=17.0,name=iPhone 15 Pro"
7477
ios-thread-safety:
7578
name: Thread Safety Tests (TSan Enabled)
76-
runs-on: macOS-14
79+
runs-on: macOS-26
7780
env:
78-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
81+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
7982
steps:
8083
- uses: actions/checkout@v2
8184
- name: Run Tests
82-
run: .scripts/test.sh -s "Nuke Thread Safety Tests" -d "OS=17.4,name=iPhone 15 Pro"
85+
run: .scripts/test.sh -s "NukeThreadSafetyTests" -d "OS=26.2,name=iPhone 17 Pro"
8386
# ios-memory-management-tests:
8487
# name: Memory Management Tests
8588
# runs-on: macOS-13
@@ -88,36 +91,22 @@ jobs:
8891
# steps:
8992
# - uses: actions/checkout@v2
9093
# - name: Run Tests
91-
# run: .scripts/test.sh -s "Nuke Memory Management Tests" -d "OS=14.4,name=iPhone 12 Pro"
94+
# run: .scripts/test.sh -s "NukeMemoryManagementTests" -d "OS=14.4,name=iPhone 12 Pro"
9295
ios-performance-tests:
9396
name: Performance Tests
94-
runs-on: macOS-14
97+
runs-on: macOS-26
9598
env:
96-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
99+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
97100
steps:
98101
- uses: actions/checkout@v2
99102
- name: Run Tests
100-
run: .scripts/test.sh -s "Nuke Performance Tests" -d "OS=17.4,name=iPhone 15 Pro"
103+
run: .scripts/test.sh -s "NukePerformanceTests" -d "OS=26.2,name=iPhone 17 Pro"
101104
swift-build:
102105
name: Swift Build (SPM)
103-
runs-on: macOS-14
106+
runs-on: macOS-26
104107
env:
105-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
108+
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
106109
steps:
107110
- uses: actions/checkout@v2
108111
- name: Build
109112
run: swift build
110-
discover-typos:
111-
name: Discover Typos
112-
runs-on: macOS-13
113-
env:
114-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
115-
steps:
116-
- uses: actions/checkout@v2
117-
- name: Discover typos
118-
run: |
119-
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
120-
python3 -m pip install --upgrade pip
121-
python3 -m pip install codespell
122-
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*"
123-

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## System
22
.DS_Store
33

4+
.claude/settings.local.json
5+
46
## Build generated
57
build/
68
DerivedData

CHANGELOG.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Nuke 12
22

3+
## Nuke 12.9.0
4+
5+
*Feb 22, 2026*
6+
7+
- Enable Swift 6 and fix remaining concurrency warnings
8+
- Optimize `ImageTask` `AsyncStream` APIs and remove the Combine dependency. It now essentially has no overhead.
9+
- Updating misleading SVG support by @realmtai in https://github.com/kean/Nuke/pull/839
10+
- Fix deprecation warning typo by @cameronmcefee in https://github.com/kean/Nuke/pull/861
11+
- Mark `DataLoading` closures as `@Sendable` by @plu in https://github.com/kean/Nuke/pull/862
12+
- `.storeAll` now stores processed images for locals too, as it should be by @HyperfocusDisordered in https://github.com/kean/Nuke/pull/810
13+
- Add `.heic` support to `AssetType/init` so it can detect it based on the input `Data`
14+
- Remove some `@unchecked` markers from `Sendable` types for better Data Race Safety checking
15+
- Fix an issue with `DataCache` not touching `.contentAccessDate` when accessing files
16+
317
## Nuke 12.8.0
418

519
*Jul 13, 2024*
@@ -72,7 +86,7 @@ This release contains major improvements to the Structured Concurrency support a
7286
- Fix Xcode 15.3 concurrency warnings when using `Screen.scale` by @jszumski in https://github.com/kean/Nuke/pull/766
7387
- Add `showPlaceholderOnFailure` parameter to show placeholder in case of image loading failure by @mlight3 in https://github.com/kean/Nuke/pull/764
7488
- Fix image loading test on iOS 17 by @woxtu in https://github.com/kean/Nuke/pull/768
75-
- Update thumbnail key value for `ImageRequest`` by @woxtu in https://github.com/kean/Nuke/pull/769
89+
- Update thumbnail key value for `ImageRequest` by @woxtu in https://github.com/kean/Nuke/pull/769
7690
- Remove trailing whitespaces by @woxtu in https://github.com/kean/Nuke/pull/767
7791
- Apply `if let` shorthand syntax by @mlight3 in https://github.com/kean/Nuke/pull/762
7892

@@ -255,7 +269,7 @@ There is now less code that you need to include in your project, which means fas
255269

256270
*Dec 25, 2022*
257271

258-
- Fix `ImagePipeline.shared` warning with Strit Concurrency Checking set to Complete
272+
- Fix `ImagePipeline.shared` warning with Strict Concurrency Checking set to Complete
259273
- Fix an issue where `ImagePrefetcher/didComplete` wasn't called in some scenarios
260274
- `ImagePrefetcher/didComplete` is now called on the main queue
261275

@@ -540,8 +554,8 @@ This release added async/await, but the change was [reverted](https://github.com
540554

541555
*Oct 23, 2021*
542556

543-
- Improve image decompressiong performance on iOS 15 and tvOS 15 by using [preparingForDisplay()](https://developer.apple.com/documentation/uikit/uiimage/3750834-preparingfordisplay?language=o_5) (requires Xcode 13) - [#512](https://github.com/kean/Nuke/pull/512)
544-
- On iOS 15, tvOS 15, image decompressiong now preserves 8 bits per pixel for grayscale images - [#512](https://github.com/kean/Nuke/pull/512)
557+
- Improve image decompression performance on iOS 15 and tvOS 15 by using [preparingForDisplay()](https://developer.apple.com/documentation/uikit/uiimage/3750834-preparingfordisplay?language=o_5) (requires Xcode 13) - [#512](https://github.com/kean/Nuke/pull/512)
558+
- On iOS 15, tvOS 15, image decompression now preserves 8 bits per pixel for grayscale images - [#512](https://github.com/kean/Nuke/pull/512)
545559
- Adopt extended static member lookup ([SE-0299](https://github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md)) (requires Xcode 13) - [#513](https://github.com/kean/Nuke/pull/513)
546560

547561
```swift
@@ -565,7 +579,7 @@ ImageRequest(url: url, processors: [.resize(width: 320)])
565579

566580
*Aug 28, 2021*
567581

568-
- Add an API for efficiently image thumbnails or retrieving existings ones - [#503](https://github.com/kean/Nuke/pull/503)
582+
- Add an API for efficiently creating image thumbnails or retrieving existing ones - [#503](https://github.com/kean/Nuke/pull/503)
569583
- Fix an issue with scale (`ImageRequest.UserInfoKey.scaleKey`) not being applied to progressively decoded images
570584

571585
## Nuke 10.3.4

Documentation/Migrations/Nuke 10 Migration Guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This guide eases the transition of the existing apps that use Nuke 9.x to the la
1212

1313
## Overview
1414

15-
Nuke 10 contains a ton of new features, refinements, and performance improvements. There are some breaking changes and deprecation that the compiler will guide you through as you update. Most users are not going to need this guide.
15+
Nuke 10 contains a ton of new features, refinements, and performance improvements. There are some breaking changes and deprecations that the compiler will guide you through as you update. Most users are not going to need this guide.
1616

1717
## loadImage() Signature
1818

@@ -58,11 +58,11 @@ configuration.dataCachePolicy = .storeAll
5858

5959
Or use a new [`.automatic`](https://kean-org.github.io/docs/nuke/reference/10.0.0/ImagePipeline_Configuration_DataCachePolicy/#imagepipeline.configuration.datacachepolicy.automatic) policy if it best fits your needs: for requests with processors, encode and store processed images; for requests with no processors, store original image data.
6060

61-
> Learn more about the policies and other caching changes in ["Caching: Cacheke Policy."](https://kean.blog/nuke/guides/caching#cache-policy)
61+
> Learn more about the policies and other caching changes in ["Caching: Cache Policy."](https://kean.blog/nuke/guides/caching#cache-policy)
6262
6363
## Disk Cache Configuration
6464

65-
Nuke 10 simplifies disk cache configuration by introducing two built-in configuration: [`ImagePipeline.Configuration.withDataCache`](https://kean-org.github.io/docs/nuke/reference/10.0.0/ImagePipeline_Configuration/#imagepipeline.configuration.withdatacache) (aggressive disk cache enabled) and [`withURLCache`](https://kean-org.github.io/docs/nuke/reference/10.0.0/ImagePipeline_Configuration/#imagepipeline.configuration.withurlcache) (HTTP disk cache enabled)
65+
Nuke 10 simplifies disk cache configuration by introducing two built-in configurations: [`ImagePipeline.Configuration.withDataCache`](https://kean-org.github.io/docs/nuke/reference/10.0.0/ImagePipeline_Configuration/#imagepipeline.configuration.withdatacache) (aggressive disk cache enabled) and [`withURLCache`](https://kean-org.github.io/docs/nuke/reference/10.0.0/ImagePipeline_Configuration/#imagepipeline.configuration.withurlcache) (HTTP disk cache enabled)
6666

6767
```swift
6868
// Before (Nuke 9)

Documentation/Migrations/Nuke 11 Migration Guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extension ImageProcessors {
5858
public struct Resize: ImageProcessing, Hashable {
5959
private let size: CGSize
6060

61-
var hashableIdentiifer: AnyHashable { self }
61+
var hashableIdentifier: AnyHashable { self }
6262
}
6363
}
6464

@@ -77,7 +77,7 @@ If you invalidate the pipeline, any new requests will immediately fail with `Ima
7777

7878
## ImageRequestConvertible
7979

80-
`ImageRequestConvertible` was originally introduced in [Nuke 9.2](https://github.com/kean/Nuke/releases/tag/9.2.0) to reduce number of `loadImage(:)` APIs in code completion, but it's no longer an issue with the new async/await APIs.
80+
`ImageRequestConvertible` was originally introduced in [Nuke 9.2](https://github.com/kean/Nuke/releases/tag/9.2.0) to reduce the number of `loadImage(:)` APIs in code completion, but it's no longer an issue with the new async/await APIs.
8181

8282
`ImageRequestConvertible` is soft-deprecated in Nuke 11. The other soft-deprecated APIs, such as a closure-based `ImagePipeline/loadImage(:)` will continue working with it. The new APIs, such as async/await `ImagePipeline/image(for:)` will work with `URL` and `ImageRequest` which is better for discoverability and performance.
8383

Documentation/Migrations/Nuke 12 Migration Guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ LazyImage(url: URL(string: "https://example.com/image.jpeg")) { state in
102102
}
103103
```
104104

105-
To display animated image, use one of the GIF rendering frameworks, such as [Gifu](https://github.com/kaishin/Gifu), directly:
105+
To display an animated image, use one of the GIF rendering frameworks, such as [Gifu](https://github.com/kaishin/Gifu), directly:
106106

107107
```swift
108108
// After (Nuke 12)
@@ -119,7 +119,7 @@ LazyImage(url: URL(string: "https://example.com/image.jpeg")) { state in
119119

120120
The same approach applies to videos, but you can use the built-in `NukeVideo` module to render them.
121121

122-
The way you enable animations have also been updated and matches `AsyncImage`:
122+
The way you enable animations has also been updated and matches `AsyncImage`:
123123

124124
```swift
125125
// Before (Nuke 11)

Documentation/Migrations/Nuke 4 Migration Guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Here's a few design principles adopted in Nuke 4:
2222

2323
- **Protocol-Oriented Programming.** Nuke 3 promised a lot of customization by providing a set of protocols for loading, caching, transforming images, etc. However, those protocols were vaguely defined and hard to implement in practice. Protocols in Nuke 4 are simple and precise, often consisting of a single method.
2424
- **Single Responsibility Principle.** For example, instead of implementing preheating and deduplicating of equivalent requests in a single vague `ImageManager` class, those features were moved to separate classes (`Preheater`, `Deduplicator`). This makes core classes much easier to reason about.
25-
- **Principle of Least Astonishment**. Nuke 3 had a several excessive protocols, classes and methods which are *all gone* now (`ImageTask`, `ImageManagerConfiguration` just to name a few). Those features are much easier to use now.
25+
- **Principle of Least Astonishment**. Nuke 3 had several excessive protocols, classes and methods which are *all gone* now (`ImageTask`, `ImageManagerConfiguration` just to name a few). Those features are much easier to use now.
2626
- **Simpler Async**. Image loading involves a lot of asynchronous code, managing it was a chore. Nuke 4 adopts two design patterns ([**Promise**](https://github.com/kean/Promise) and **CancellationToken**) that solve most of those problems.
2727

2828
The adoption of those design principles resulted in a simpler, more testable, and more concise code base (which is now under 900 slocs, compared to AlamofireImage's 1426, and Kingfisher's whopping 2357).
@@ -49,7 +49,7 @@ Make sure to check out new [Toucan plugin](https://github.com/kean/Nuke-Toucan-P
4949

5050
## Changes in Nuke 4
5151

52-
Almost every API in Nuke has been modified in some way. It's impossible to document every single changes, so here's a list of some of the major and mostly user-visible changes.
52+
Almost every API in Nuke has been modified in some way. It's impossible to document every single change, so here's a list of some of the major and mostly user-visible changes.
5353

5454
### Basics
5555

@@ -215,7 +215,7 @@ let cachedResponse = manager.cachedResponseForRequest(request)
215215

216216
// Nuke 4
217217
let cache = Cache.shared
218-
let request = Request(url: URL(string: "")!))
218+
let request = Request(url: URL(string: "")!)
219219
cache[request] = UIImage()
220220
let image = cache[request]
221221
```
@@ -283,11 +283,11 @@ Adopt `AnyHashable` instead of `ImageRequestKey` (which was renamed to `Request.
283283

284284
### Request Priority
285285

286-
Priority was removed temporary from `Request` because it wasn't performing as good as expected. There should be a better way to implement it.
286+
Priority was removed temporarily from `Request` because it wasn't performing as well as expected. There should be a better way to implement it.
287287

288288
### Progress Handler
289289

290-
Progress handler was temporary removed from `Request`. I'm still on the fence whether this feature should be included in the framework itself. It might be better handled by notification implemented in a specific `DataLoader`.
290+
Progress handler was temporarily removed from `Request`. I'm still on the fence whether this feature should be included in the framework itself. It might be better handled by notification implemented in a specific `DataLoader`.
291291

292292
You can always just display an activity indicator instead:
293293

Documentation/Migrations/Nuke 5 Migration Guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This guide is provided in order to ease the transition of existing applications
1212

1313
Nuke 5 is a relatively small release which removes some of the complexity from the framework. Hopefully it will make *contributing* to Nuke easier.
1414

15-
One of the major changes is the removal of promisified API as well as `Promise` itself. Promises were briefly added in Nuke 4 as an effort to simplify async code. The major downsides of promises are compelex memory management, extra complexity for users unfamiliar with promises, complicated debugging, performance penalties. Ultimately I decided that promises were adding more problems that they were solving.
15+
One of the major changes is the removal of promisified API as well as `Promise` itself. Promises were briefly added in Nuke 4 as an effort to simplify async code. The major downsides of promises are complex memory management, extra complexity for users unfamiliar with promises, complicated debugging, performance penalties. Ultimately I decided that promises were adding more problems than they were solving.
1616

1717
Chances are that changes made in Nuke 5 are not going to affect your code.
1818

@@ -37,8 +37,8 @@ Chances are that changes made in Nuke 5 are not going to affect your code.
3737
> - `Manager` now has new methods to load images w/o target (Nuke 5.0.1)
3838
3939
- If you're not constructing a custom `Loader` and you're not using it directly this change doesn't affect you
40-
- If you're using custom `Loader` directly and rely on its memory caching please new `Manager` APIs that load images w/o target
41-
- If you're constructing a custom `Loader` but don't use it directly then simply update to a new initializer which not longer requires you to pass memory cache in
40+
- If you're using custom `Loader` directly and rely on its memory caching, please use the new `Manager` APIs that load images w/o target
41+
- If you're constructing a custom `Loader` but don't use it directly then simply update to a new initializer which no longer requires you to pass memory cache in
4242

4343
### Removed `DataCaching` and `CachingDataLoader`
4444

0 commit comments

Comments
 (0)