Skip to content

Expose CuckooGenerator as executable product - #588

Merged
MatyasKriz merged 3 commits into
Brightify:masterfrom
nmcc24:nmcc24/cuckoo-generator-product
Jul 27, 2026
Merged

Expose CuckooGenerator as executable product#588
MatyasKriz merged 3 commits into
Brightify:masterfrom
nmcc24:nmcc24/cuckoo-generator-product

Conversation

@nmcc24

@nmcc24 nmcc24 commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Summary

Exposes CuckooGenerator as a public executable product so downstream consumers can build
custom build plugins on top of it. In order to do so, XcodeProj must be bumped to 9.13.0+.

Changes

File Change
Package.swift Adds .executable(name: "CuckooGenerator", targets: ["CuckooGenerator"]) product; bumps XcodeProj 9.9.09.14.0; raises .macOS platform floor 10.1511.0
Package.resolved Re-resolved pin for XcodeProj9.14.0 (eb001108...), originHash regenerated
Generator/Sources/Internal/Helpers/Async+convenience.swift #available(macOS 14.0, *)#available(macOS 14.0, iOS 17.0, *) — adds the iOS branch needed now that CuckooGenerator can be built for iOS as a side effect of the executable product

Verification

  • swift package resolve — resolves cleanly against the new XcodeProj version.
  • swift build — full build succeeds (CuckooGenerator and CuckooGenerator-tool link successfully).

Things to call out to reviewers

  • Breaking for consumers still on macOS 10.15: the platform bump to macOS 11.0 is required
    by XcodeProj 9.14.0 itself (its manifest declares 11.0 as its floor), not a choice made here.
    Worth a one-line mention in the PR body since it's a compatibility change, not just a version bump.
  • iOS compilation of CuckooGenerator: per the earlier PR discussion, exposing this as an
    executable product means it now also compiles for iOS as a side effect of the platform list,
    even though it's really meant for host-side (macOS) tooling use. Nothing in Package.swift
    stops an app target from linking it. Confirm the README documents that this is intended for
    build-tool/plugin use only, not for shipping inside an app target.
  • No behavior changes to existing Cuckoo/mocking runtime code — this is purely packaging +
    dependency surface.

@nmcc24

nmcc24 commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

In order to ensure successful compilation of CuckooGenerator on the iOS platform, we are currently blocked by tuist/XcodeProj#1016. Once this gets merged, we will be able to finalise compilation of the product.

@MatyasKriz please do let me know if you'd like me to bring any iOS compilation fixes as part of this MR or as a follow up MR.

@MatyasKriz

Copy link
Copy Markdown
Collaborator

I didn't know that you intended to compile the generator for iOS, not sure if that can work, but if you can get it working it's up to you whether to include it in this PR or a follow-up one, I think it shouldn't be an issue either way since most users don't use CuckooGenerator this way.

What I'm a bit hesitant about is that when CuckooGenerator is compilable for iOS, there won't be anything stopping users from using it in their app target instead of the test one, not sure if that happens due to bad README or speeding through without reading it.

@nmcc24

nmcc24 commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

Hi @MatyasKriz

Thanks for your response and sharing your views.

The compilation for iOS is simply a side effect of running the build tool plugging when targeting that platform.

As far as I have observed, there is no way of restricting a package (and its products) to a particular platform. Even if one does not mentioned them in the Package.swift file, it will end up defaulting to a minimum version.

It is true that by opening up the executable as public product would allow that use case to occur. However, it seems to me that it wouldn't ever work on a platform other than MacOS/Linux. By complementing this with a potential mention on the README file, I believe we would be providing any consumer with enough information - I appreciate however this is very subjective :)

In short, unless we consider modifying the plugin you provide (which I don't think we should consider as it would introduce unnecessary and niche complexity to this repo), I can't see any other way that allows us to enable the composition I'm trying to achieve.

@nmcc24
nmcc24 force-pushed the nmcc24/cuckoo-generator-product branch from a843bb6 to 4fd486e Compare January 27, 2026 09:51
nmcc24 added 3 commits July 18, 2026 23:38
This allows any consumer of Cuckoo to build custom build plugins that rely on CuckooGenerator
Add iOS availability check to guarantee code compilation
Raises the macOS platform floor to 11.0, which XcodeProj 9.14.0 requires.
@nmcc24
nmcc24 force-pushed the nmcc24/cuckoo-generator-product branch from 4fd486e to d88523d Compare July 18, 2026 22:46
@nmcc24
nmcc24 marked this pull request as ready for review July 18, 2026 22:46
@nmcc24

nmcc24 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

@MatyasKriz this is now finally ready to be reviewed as XcodeProj 9.13.0+ now has all necessary changes required to make this happen.

@MatyasKriz MatyasKriz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, merging. We'll revisit this if users find themselves confused when adding the library.

@MatyasKriz
MatyasKriz merged commit 8e15c47 into Brightify:master Jul 27, 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.

2 participants