Skip to content

feat: add Windows CI support with Swift 6.3#64

Merged
alexey1312 merged 17 commits intomainfrom
fix/windows-ci-support
Mar 25, 2026
Merged

feat: add Windows CI support with Swift 6.3#64
alexey1312 merged 17 commits intomainfrom
fix/windows-ci-support

Conversation

@alexey1312
Copy link
Copy Markdown
Collaborator

@alexey1312 alexey1312 commented Feb 24, 2026

Summary

  • Add Windows build job to ci.yml and release.yml using Swift 6.3 (compnerd/gha-setup-swift)
  • Delete standalone windows-test.yml, integrate Windows into main CI/release workflows
  • Make XcodeProj and MCP SDK dependencies conditional (#if !os(Windows) in Package.swift)
  • Wrap XcodeProjectWriter in #if canImport(XcodeProj) across 6 export files, MCP files in #if canImport(MCP)
  • Use idiomatic #if canImport(FoundationNetworking) instead of #if os(Linux) for cross-platform imports
  • Pin swift-resvg to 0.45.1-swift.15 (Windows artifactbundle with correct resvg.lib naming)
  • Adopt Swift 6.3, update CI images (Ubuntu 24.04, macOS 15), upgrade MCP SDK to 0.12.0
  • Replace Stencil with swift-jinja (PathKit didn't support Windows)
  • Fix deprecated MCP SDK .text(_:metadata:) calls → .text(text:annotations:_meta:)
  • Install Swift 6.3 via .pkg toolchain on macOS CI (swiftly unreliable in CI)
  • Update platform docs: CLAUDE.md, linux-compat.md, README.md, DocC articles

Notes

  • Windows CI is build-only (Debug), no tests yet
  • Swift 6.3 required on Windows due to SPM artifactbundle handling (no lib prefix for .lib files)
  • Release workflow produces exfig-windows-x64.zip with ExFig.exe and resource bundles

Test plan

  • CI passes on all three platforms (macOS, Linux, Windows)
  • ./bin/mise run build succeeds locally
  • ./bin/mise run test passes locally
  • MCP server starts without deprecation warnings

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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

  • Windows CI Support: Added comprehensive Windows build support to the continuous integration and release workflows, utilizing Swift 6.3 for compatibility.
  • CI Workflow Streamlining: Integrated Windows build jobs directly into the main ci.yml and release.yml workflows, removing the standalone windows-test.yml.
  • Conditional Dependencies: Implemented conditional compilation for the XcodeProj dependency in Package.swift and wrapped XcodeProjectWriter usage, ensuring it's only included on non-Windows platforms.
  • Cross-Platform Imports: Refactored FoundationNetworking and FoundationXML imports to use #if canImport() directives instead of #if os(Linux), improving cross-platform compatibility for Linux and Windows.
  • Dependency Pinning: Pinned the swift-resvg dependency to a specific version (0.45.1-swift.15) to address Windows artifactbundle compatibility issues related to library naming conventions.
  • Documentation Updates: Updated CLAUDE.md, linux-compat.md, and README.md to reflect the new Windows platform support and its specific requirements.
Changelog
  • .claude/rules/linux-compat.md
    • Updated the document title and introductory text to include Windows compatibility.
    • Expanded the 'Platform-Specific Features' table with a 'Windows' column, detailing HEIC encoding, libpng tests, Foundation, XcodeProj, and Swift version requirements for Windows.
    • Added a new 'Windows Support' section, covering Swift version requirements, conditional dependencies in Package.swift, XcodeProj exclusion details, idiomatic canImport() usage for FoundationNetworking/XML, and SPM artifactbundle specifics on Windows.
  • CLAUDE.md
    • Updated the 'Platforms' entry in the 'Project Context' table to include Windows (Swift 6.3).
    • Adjusted the module count from 'Twelve' to 'Thirteen' in the 'Architecture' section.
    • Added 'JinjaSupport' module to the module list.
    • Updated the 'XcodeProj' dependency description to specify 'macOS/Linux only'.
    • Updated the 'swift-resvg' dependency version and added a note about Windows requiring Swift 6.3.
    • Modified the description for linux-compat.md to reflect Linux/Windows platform workarounds.
  • Package.resolved
    • Updated the originHash for the package resolution.
    • Updated the swift-resvg dependency to version 0.45.1-swift.15 with a new revision.
  • Package.swift
    • Refactored package dependencies and executable target dependencies into separate packageDependencies and exfigCLIDependencies variables.
    • Implemented conditional compilation using #if !os(Windows) to append XcodeProj as a dependency only on non-Windows platforms.
    • Updated the swift-resvg dependency to 0.45.1-swift.15.
    • Added exclude property to the JinjaSupport target.
  • README.md
    • Updated the 'Requirements' section to specify Swift 6.2+ for macOS/Linux and Swift 6.3+ for Windows.
    • Expanded supported platforms to include Windows.
  • Sources/ExFigCLI/ExFig.docc/CustomTemplates.md
    • Added a blank line for formatting.
  • Sources/ExFigCLI/Output/FileDownloader.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/ExFigCLI/Output/FileWriter.swift
    • Replaced #if os(Linux) with #if canImport(FoundationXML) for conditional import.
  • Sources/ExFigCLI/Output/XcodeProjectWriter.swift
    • Wrapped the entire content of the file within an #if canImport(XcodeProj) block to make it conditionally available.
  • Sources/ExFigCLI/Pipeline/SharedDownloadQueue.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/ExFigCLI/Subcommands/Export/PluginColorsExport.swift
    • Wrapped the Xcode project update logic within an #if canImport(XcodeProj) block.
  • Sources/ExFigCLI/Subcommands/Export/PluginIconsExport.swift
    • Wrapped the Xcode project update logic within an #if canImport(XcodeProj) block.
  • Sources/ExFigCLI/Subcommands/Export/PluginImagesExport.swift
    • Wrapped the Xcode project update logic within an #if canImport(XcodeProj) block.
  • Sources/ExFigCLI/Subcommands/Export/PluginTypographyExport.swift
    • Wrapped the Xcode project update logic within an #if canImport(XcodeProj) block.
  • Sources/ExFigCLI/Subcommands/Export/iOSColorsExport.swift
    • Wrapped the Xcode project update logic within an #if canImport(XcodeProj) block.
  • Sources/FigmaAPI/Client.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/BaseEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/ComponentsEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/Endpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/FileMetadataEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/ImageEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/LatestReleaseEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/NodesEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/StylesEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/UpdateVariablesEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/Endpoint/VariablesEndpoint.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/FigmaAPIError.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/FigmaClient.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/GitHubClient.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/RateLimitedClient.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/FigmaAPI/RetryPolicy.swift
    • Replaced #if os(Linux) with #if canImport(FoundationNetworking) for conditional import.
  • Sources/SVGKit/SVGParser.swift
    • Replaced #if os(Linux) with #if canImport(FoundationXML) for conditional import.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/ci.yml
    • .github/workflows/release.yml
    • .github/workflows/windows-test.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@alexey1312 alexey1312 force-pushed the fix/windows-ci-support branch from 20e6f14 to 9a2f350 Compare February 24, 2026 04:55
alexey1312 and others added 2 commits March 25, 2026 13:35
- 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>
@alexey1312 alexey1312 force-pushed the fix/windows-ci-support branch from 9a2f350 to 7425b20 Compare March 25, 2026 08:36
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.
@alexey1312 alexey1312 changed the title Add Windows CI support with Swift 6.3 feat: add Windows CI support with Swift 6.3 Mar 25, 2026
… 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.
@alexey1312 alexey1312 marked this pull request as ready for review March 25, 2026 14:17
@alexey1312
Copy link
Copy Markdown
Collaborator Author

@gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@alexey1312 alexey1312 merged commit a023c97 into main Mar 25, 2026
3 of 4 checks passed
@alexey1312 alexey1312 deleted the fix/windows-ci-support branch March 25, 2026 17:10
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