Skip to content

test: import Foundation to fix FakePluginAuthError LocalizedError conformance on Xcode 26.4.1#1852

Merged
datlechin merged 3 commits into
mainfrom
fix/reconnect-test-extension-conformance
Jul 10, 2026
Merged

test: import Foundation to fix FakePluginAuthError LocalizedError conformance on Xcode 26.4.1#1852
datlechin merged 3 commits into
mainfrom
fix/reconnect-test-extension-conformance

Conversation

@datlechin

Copy link
Copy Markdown
Member

Follow-up to #1851, which did not fix the failure. main's macOS App Tests still fail to compile with the same error on Xcode 26.4.1:

error: type 'FakePluginAuthError' does not conform to protocol 'LocalizedError'

Adding an explicit errorDescription (in #1851) did not help, so the missing witness was not the cause. The real difference: every shipping plugin error type conforms to PluginDriverError via a separate extension, with the base Error conformance stated on the type (enum DuckDBPluginError: Error + extension DuckDBPluginError: PluginDriverError). None conform inline. The test helper was the only inline struct X: PluginDriverError, and on the Xcode 26.4.1 compiler that inline conformance to a resilient cross-module protocol refining LocalizedError fails to synthesize the inherited LocalizedError conformance.

Fix

Match the pattern used by all 13 real conformers: declare Error on the type and add PluginDriverError in an extension. Test-only, no TableProPluginKit ABI impact.

Verification

Cannot compile-verify locally (Xcode 27 does not reproduce the 26.4.1 behavior). Relying on the macOS Tests check on this PR, which runs on the same 26.4.1 toolchain, plus the fact that this is the exact pattern shipping plugins already build with.

@datlechin datlechin changed the title test: fix FakePluginAuthError conformance (extension pattern) for Xcode 26.4.1 test: import Foundation to fix FakePluginAuthError LocalizedError conformance on Xcode 26.4.1 Jul 10, 2026
@datlechin datlechin merged commit 6abbad2 into main Jul 10, 2026
3 checks passed
@datlechin datlechin deleted the fix/reconnect-test-extension-conformance branch July 10, 2026 09:06
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