feat: add Windows CI support with Swift 6.3#64
Conversation
Summary of ChangesHello @alexey1312, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the project's platform compatibility by introducing full Windows support. It integrates Windows build processes into the existing CI/CD pipelines, making the build system more robust and unified. Key changes include adapting dependencies and code for Windows-specific behaviors, particularly around Xcode project handling and Foundation imports, and updating documentation to reflect these new capabilities. The overall impact is a broader reach for the project, enabling development and deployment on Windows environments. Highlights
Changelog
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively adds Windows CI support by introducing conditional compilation for platform-specific dependencies like XcodeProj and updating build configurations. The switch from os(Linux) checks to canImport(FoundationNetworking) is a great improvement for cross-platform compatibility.
My main feedback is on a recurring style issue: in several files, the code inside new #if canImport(...) blocks is unnecessarily indented. While this doesn't break the build, it reduces readability. I've left comments with suggestions to fix the indentation in the affected files.
20e6f14 to
9a2f350
Compare
- Add Windows build to ci.yml and release.yml using Swift 6.3 - Replace Stencil with swift-jinja for cross-platform compatibility - Add JinjaSupport shared module for template rendering - Make XcodeProj conditional (#if !os(Windows)) in Package.swift - Wrap XcodeProjectWriter in #if canImport(XcodeProj) (6 export files) - Use #if canImport(FoundationNetworking) instead of #if os(Linux) - Pin swift-resvg to 0.45.1-swift.15 (Windows artifactbundle) - Delete standalone windows-test.yml - Update docs: CLAUDE.md, linux-compat.md, README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9a2f350 to
7425b20
Compare
MCP swift-sdk depends on swift-nio which doesn't compile on Windows. Wrap MCP files in #if canImport(MCP) and conditionally include the dependency only on non-Windows platforms.
README, GettingStarted, Development, ExFig overview, and CI/CD guide now mention Windows (Swift 6.3+) alongside macOS and Linux, including platform limitations (no MCP server, no XcodeProj).
- Bump swift-tools-version to 6.3, manage Swift via swiftly (.swift-version) - CI: macOS Xcode 26.2, Linux swift:6.3-jammy, Windows stable 6.3 release - Upgrade MCP SDK 0.12.0: fix GetPrompt arguments type ([String: String]?), adapt .text enum pattern matching to 3 associated values - Use FigmaAPI::Client module selectors in MCP files (Swift 6.3 feature) - Add DocC code block annotations (nocopy, showLineNumbers) with --enable-experimental-code-block-annotations flag - Upgrade SwiftFormat 0.59.1 → 0.60.1 (module selector support) - Remove Swift from mise.toml (swiftly manages toolchain) - Update docs: CLAUDE.md, linux-compat, Development, CICDIntegration - Regenerate llms-full.txt
…ag on Windows macOS runners ship Xcode with Swift 6.2.3 — install Swift 6.3 toolchain via swiftly for swift-tools-version: 6.3 compatibility. Windows: use branch/tag params (the only valid inputs for compnerd/gha-setup-swift).
swiftly-install.sh requires GNU getopt (not available on macOS runners). Download Swift 6.3 .pkg directly from swift.org and use TOOLCHAINS env var.
…ctions Migrate all .text(_:metadata:) calls in MCPToolHandlers to .text(text:annotations:_meta:) to fix 10 deprecation warnings from MCP SDK 0.12.0. Update CLAUDE.md build environment section to recommend ./bin/mise run build/test instead of raw export commands.
… Windows The action prepends `swift-` to the tag, so `swift-6.3-RELEASE` produced a 404 URL (`swift-swift-6.3-RELEASE`). Use `6.3-RELEASE` instead.
|
@gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces Windows compatibility for the ExFig CLI tool, updating the Swift toolchain to 6.3 and modifying dependency management in Package.swift to conditionally include XcodeProj and swift-sdk for non-Windows platforms. Various documentation files, including .claude/rules/*, CLAUDE.md, README.md, and ExFig.docc/*, have been updated to reflect Windows support and related changes. Additionally, Sendable conformance was removed from numerous structs and enums across the codebase, and @Suite attributes were removed from many test files. The mise bootstrap script and dependency versions were also updated. The review highlights that the Package.swift file should update the minimum versions for swift-svgkit to 0.2.0 and swift-sdk to 0.12.0 to ensure compatibility and prevent build failures.
- Fix CICDIntegration.md tag format (6.3-RELEASE, not swift-6.3-RELEASE) - Fix CLAUDE.md module count (Twelve, not Thirteen) - Bump swift-svgkit minimum to 0.2.0, swift-sdk to 0.12.0 - Use guard case let in MCP test helpers for reliable assertions - Clarify Package.swift comment, Development.md requirements - Add SilentlyContinue comment in release.yml Windows archive step - Add SwiftFormat #if indent and SPM from: gotchas to CLAUDE.md
Summary
ci.ymlandrelease.ymlusing Swift 6.3 (compnerd/gha-setup-swift)windows-test.yml, integrate Windows into main CI/release workflows#if !os(Windows)in Package.swift)#if canImport(XcodeProj)across 6 export files, MCP files in#if canImport(MCP)#if canImport(FoundationNetworking)instead of#if os(Linux)for cross-platform imports0.45.1-swift.15(Windows artifactbundle with correctresvg.libnaming).text(_:metadata:)calls →.text(text:annotations:_meta:).pkgtoolchain on macOS CI (swiftly unreliable in CI)Notes
libprefix for.libfiles)exfig-windows-x64.zipwithExFig.exeand resource bundlesTest plan
./bin/mise run buildsucceeds locally./bin/mise run testpasses locally