Skip to content

Add Windows CI support with Swift 6.3#64

Draft
alexey1312 wants to merge 2 commits intomainfrom
fix/windows-ci-support
Draft

Add Windows CI support with Swift 6.3#64
alexey1312 wants to merge 2 commits intomainfrom
fix/windows-ci-support

Conversation

@alexey1312
Copy link
Collaborator

Description

  • 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 dependency conditional (#if !os(Windows) in Package.swift)
  • Wrap XcodeProjectWriter in #if canImport(XcodeProj) across 6 export files
  • 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)
  • Update platform docs: CLAUDE.md, linux-compat.md, README.md

Additional notes

  • Windows CI is build-only (Debug + Release), 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

@gemini-code-assist
Copy link

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

@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 and others added 2 commits February 24, 2026 09:54
- 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 20e6f14 to 9a2f350 Compare February 24, 2026 04:55
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