Skip to content

Verify generated code compiles across Swift language modes#15

Merged
rozd merged 1 commit intomainfrom
test/verify-swift-language-mode-compatibility
Feb 28, 2026
Merged

Verify generated code compiles across Swift language modes#15
rozd merged 1 commit intomainfrom
test/verify-swift-language-mode-compatibility

Conversation

@rozd
Copy link
Owner

@rozd rozd commented Feb 28, 2026

Summary

  • Add compilation verification that generated code builds under all 4 combinations of Swift language mode (5/6) and default actor isolation (nonisolated/MainActor)
  • Replace committed generated fixture files with a build tool plugin that generates them at build time from theme.json
  • Add --skip-defaults flag to ThemeKitGeneratorCLI so the plugin can skip the placeholder defaults file

Test plan

  • swift build succeeds — all 4 fixture targets compile with plugin-generated code
  • swift test passes — all 219 tests pass including GeneratedCodeCompilationTests
  • Verify plugin is internal (not exported as a product) and invisible to consumers

🤖 Generated with Claude Code

Add compilation verification targets that build generated code under 4
combinations of Swift language mode (5/6) and default actor isolation
(nonisolated/MainActor). A build tool plugin generates fixture files at
build time from theme.json, replacing previously committed generated files.

- Add --skip-defaults flag to ThemeKitGeneratorCLI
- Add internal GenerateTestFixturesPlugin (BuildToolPlugin)
- Add 4 fixture targets with theme.json + hand-written Theme+Defaults.swift
- Add GeneratedCodeCompilationTests with runtime smoke checks

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

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (e2148fe) to head (d9057eb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   98.89%   98.91%   +0.01%     
==========================================
  Files          35       36       +1     
  Lines        2178     2202      +24     
==========================================
+ Hits         2154     2178      +24     
  Misses         24       24              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozd rozd merged commit b92f37e into main Feb 28, 2026
3 checks passed
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