Skip to content

API changes from the audit, and version 3.0.0-beta.2 - #70

Merged
nmcc24 merged 5 commits into
masterfrom
beta2-api
Nov 13, 2026
Merged

nmcc24 merged 5 commits into
masterfrom
beta2-api

Conversation

@nmcc24

@nmcc24 nmcc24 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

The API changes from the pre-release audit (Tier 3) and the version bump: the last of four PRs for 3.0.0-beta.2, after #67, #68 and #69. Once it's merged, master is ready for the 3.0.0-beta.2 release.

Making matchers Sendable is not in this release: it waits for main-actor matchers for main-actor mocks, so equal(to:) keeps working on types with main-actor-isolated conformances, as in new Xcode 26 projects.

Changelog

  • 7e8e881 Deprecate the identity overloads of equal(to:) for classes, and disfavor them: equal(to:) on an Equatable class compares with ==, and sameInstance(as:) matches the same instance.
  • b3e273a Name DefaultValueRegistry's registration register(_:for:), matching DefaultValues.register(_:for:); register(value:forType:) is deprecated.
  • 397f556 Make ClassConcreteStub and MockBuilder final.
  • 755b519 Add these changes to the changelog.
  • 1a26e34 Version 3.0.0-beta.2: version, Version.swift, the getting-started snippet and the changelog's section heading.

Testing

  • macOS swift test and the CuckooTests scheme on the iOS simulator: pass, no warnings.
  • Linux Docker, Swift 6.2 and 6.3 (native) and 6.4 (swiftbuild): swift test with upcoming features off and on, and the Swift 6 fixture matrix (off, all on, Xcode 26 defaults): pass, no warnings. 13 intentional Swift Testing known issues.
  • scripts/build-docs.sh: no docc warnings.

nmcc24 and others added 5 commits November 13, 2026 08:14
equal(to:) had an Equatable overload and an AnyObject one that compares identity, so it was ambiguous for an Equatable class. The AnyObject overloads carried renamed: without deprecated, which did nothing. They're now deprecated in favour of sameInstance(as:) and disfavored, so an Equatable class compares with == and Cuckoo 2 code that compared other class instances still compiles, with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DefaultValueRegistry.register(value:forType:) and DefaultValues.register(_:for:) did the same with different shapes. The registry now has register(_:for:) too, with the type defaulting to the value's, and the old name is a deprecated forwarder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Neither is meant to be subclassed. ConcreteStub stays non-final, since ClassConcreteStub subclasses it; as a public, non-open class it can't be subclassed outside Cuckoo either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nmcc24
nmcc24 merged commit d6b6973 into master Nov 13, 2026
16 checks passed
@nmcc24
nmcc24 deleted the beta2-api branch November 13, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant