Cuckoo icon indicating copy to clipboard operation
Cuckoo copied to clipboard

Expose CuckooGenerator as executable product

Open nmcc24 opened this issue 1 month ago • 2 comments

This allows any consumer of Cuckoo to build custom build plugins that rely on CuckooGenerator

nmcc24 avatar Nov 25 '25 11:11 nmcc24

In order to ensure successful compilation of CuckooGenerator on the iOS platform, we are currently blocked by https://github.com/tuist/XcodeProj/pull/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.

nmcc24 avatar Nov 25 '25 11:11 nmcc24

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.

MatyasKriz avatar Dec 05 '25 20:12 MatyasKriz

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 avatar Dec 12 '25 11:12 nmcc24