Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,61 @@ All notable changes to Flow will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2025-10-27

### Features

#### Task Naming Support

- **Added task naming for `.run` effects**: Leverages Swift 6.2's SE-0469 task naming capability
- New optional `name` parameter in `.run(name:operation:)` for improved debugging and profiling
- Task names appear in Xcode debugger, Instruments, and swift-inspect
- Fully backward compatible—existing code works unchanged
- Names are preserved through all configuration methods (`.catch`, `.cancellable`, `.priority`)

```swift
// Named task for better debugging
return .run(name: "🔄 Fetch user profile") { state in
let profile = try await api.fetchProfile()
state.profile = profile
}

// Dynamic naming with context
return .run(name: "Load user \(userId)") { state in
let user = try await api.fetchUser(userId)
state.user = user
}
```

**Benefits:**
- Tasks are easily identifiable in development tools
- Better observability during debugging and profiling
- Human-readable task names in thread lists and performance traces

**Requirements:**
- Swift 6.2+ (for Task naming API support)

### Documentation

- **Improved README.md**: Enhanced "Result-Returning Actions" section with clearer explanations
- Explicitly mentions that `ActionResult` type can be freely defined per Feature
- Provides better context for code examples
- Clarifies how ChildFeature, ParentView, and callbacks work together
- Emphasizes dependency tracking within the view tree

### Tests

- Added 6 comprehensive tests for task naming feature:
- Basic task naming functionality
- Backward compatibility verification (name = nil)
- Name preservation through `.catch`, `.cancellable`, `.priority`
- Name preservation through complete configuration chaining
- All 299 tests pass (293 existing + 6 new)

### Internal

- Fixed SwiftLint `function_parameter_count` violation in `Store.executeRunTask`

## [1.0.1] - 2025-10-27

### Documentation
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Add Flow to your `Package.swift`:

```swift
dependencies: [
.package(url: "https://github.com/ViewFeature/Flow.git", from: "1.0.0")
.package(url: "https://github.com/ViewFeature/Flow.git", from: "1.1.0")
],
targets: [
.target(
Expand All @@ -276,7 +276,7 @@ targets: [

- Select **File → Add Package Dependencies**
- Enter the URL: `https://github.com/ViewFeature/Flow.git`
- Select version: `1.0.0` or later
- Select version: `1.1.0` or later

**Recommended**: Add `-default-isolation MainActor` to your target's **Build Settings → Other Swift Flags**.

Expand Down
4 changes: 2 additions & 2 deletions README_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func handle() -> ActionHandler<Action, State, Void> {

```swift
dependencies: [
.package(url: "https://github.com/ViewFeature/Flow.git", from: "1.0.0")
.package(url: "https://github.com/ViewFeature/Flow.git", from: "1.1.0")
],
targets: [
.target(
Expand All @@ -275,7 +275,7 @@ targets: [

- **File → Add Package Dependencies**を選択
- 以下のURLを入力:`https://github.com/ViewFeature/Flow.git`
- バージョンを選択:`1.0.0`以降
- バージョンを選択:`1.1.0`以降

**推奨**: ターゲットの**Build Settings → Other Swift Flags**に`-default-isolation MainActor`を追加してください。

Expand Down
Loading