Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add JSONValue and UncheckedSendable#736

Merged
mickael-menu merged 18 commits intoreadium:developfrom
stevenzeck:feature/swift6-json-sendable
Mar 4, 2026
Merged

Add JSONValue and UncheckedSendable#736
mickael-menu merged 18 commits intoreadium:developfrom
stevenzeck:feature/swift6-json-sendable

Conversation

Copy link
Contributor

stevenzeck commented Feb 26, 2026

In order to make the Swift 6 migration a little less painful, I wanted to extract 3 file changes separately. These are core to replacing the use of Any in json with type safe.

This doesn't break any functionality as they are simple additions.

stevenzeck temporarily deployed to LCP February 26, 2026 03:12 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP February 26, 2026 03:12 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP February 26, 2026 03:21 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP February 26, 2026 03:21 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP March 3, 2026 17:14 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP March 3, 2026 17:14 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP March 3, 2026 17:48 -- with GitHub Actions Inactive
stevenzeck temporarily deployed to LCP March 3, 2026 17:48 -- with GitHub Actions Inactive
stevenzeck commented Mar 4, 2026
mickael-menu requested a review from Copilot March 4, 2026 09:42
Copilot started reviewing on behalf of mickael-menu March 4, 2026 09:42 View session
Copilot AI reviewed Mar 4, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces new Swift 6-migration helpers to replace untyped JSON (Any) with a type-safe JSONValue, plus an UncheckedSendable wrapper to ease Sendable adoption.

Changes:

  • Add JSONValue (Sendable/Hashable, literals, Codable) and ReadResult JSON decoding helpers returning JSONValue.
  • Add UncheckedSendable wrapper for explicitly opting into @unchecked Sendable.
  • Add unit tests for JSONValue and update Carthage/Xcode project generation files to include the new sources.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Tests/SharedTests/Toolkit/JSONValueTests.swift Adds test coverage for JSONValue initialization, literals, Codable, and decoding helpers.
Sources/Shared/Toolkit/JSONValue.swift Introduces the type-safe JSON representation and conversions from Any, plus literal/Codable conformances.
Sources/Shared/Toolkit/UncheckedSendable.swift Adds a wrapper type to force Sendable conformance when the caller guarantees thread-safety.
Sources/Shared/Toolkit/JSON.swift Adds ReadResult-style helpers to decode Data/Data? into JSONValue / object dictionaries.
Support/Carthage/Readium.xcodeproj/project.pbxproj Includes the new Swift source files in the Carthage Xcode project build.
Support/Carthage/.xcodegen Updates the XcodeGen input list (currently includes unwanted .DS_Store paths).

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mickael-menu temporarily deployed to LCP March 4, 2026 10:25 -- with GitHub Actions Inactive
mickael-menu temporarily deployed to LCP March 4, 2026 10:25 -- with GitHub Actions Inactive
mickael-menu merged commit 617f931 into readium:develop Mar 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

mickael-menu mickael-menu left review comments

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants