Skip to content

Tests: declare Instantiable conformance directly in fixtures#260

Merged
dfed merged 1 commit intomainfrom
claude/fixture-instantiable-conformance
Apr 19, 2026
Merged

Tests: declare Instantiable conformance directly in fixtures#260
dfed merged 1 commit intomainfrom
claude/fixture-instantiable-conformance

Conversation

@dfed
Copy link
Copy Markdown
Owner

@dfed dfed commented Apr 19, 2026

Summary

  • Update every @Instantiable test fixture to declare : Instantiable itself, matching how production code is written and what the macro requires.
  • Pure test-fixture refactor; no production source changes.

Why

The fixtures have been getting away without the conformance because the generator tests parse them as strings rather than expanding the macro. Declaring the conformance explicitly makes the fixtures match what the macro demands of production code, eliminates a quiet divergence from real-world usage, and unblocks downstream work that actually compiles these fixtures end-to-end.

Test plan

  • swift build --traits sourceBuild
  • swift test --traits sourceBuild (all 831 tests pass)
  • ./CLI/lint.sh (no formatting changes)

🤖 Generated with Claude Code

Update every @INSTANTIABLE test fixture to declare `: Instantiable`
itself, matching how production code is written and what the macro
requires.

The fixtures have been getting away without the conformance because
the generator tests parse them as strings rather than expanding the
macro. Declaring the conformance explicitly makes the fixtures match
what the macro demands of production code, eliminates a quiet
divergence from real-world usage, and unblocks downstream work that
actually compiles these fixtures end-to-end.

This is a pure test-fixture refactor — no production source changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d3d6454) to head (f0589c9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #260   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           41        41           
  Lines         6369      6369           
=========================================
  Hits          6369      6369           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dfed dfed merged commit 9fc186a into main Apr 19, 2026
17 checks passed
@dfed dfed deleted the claude/fixture-instantiable-conformance branch April 19, 2026 00:52
dfed added a commit that referenced this pull request Apr 19, 2026
…sions

`@Instantiable(conformsElsewhere: true)` tells the macro the conformance
is declared elsewhere, so the decorated declaration must NOT also declare
`: Instantiable`. PR #260 blindly added the conformance to every
fixture, including these four `extension Array` cases — making the
decoration self-contradictory.

Drop `: Instantiable` from the four affected extensions so the decoration
matches its meaning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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