tuist / tuist

Tuist's CLI
https://tuist.io
MIT License
4.57k stars 553 forks source link

Support for External Build System Targets #5534

Open fcjr opened 11 months ago

fcjr commented 11 months ago

What problem or need do you have?

As a few of us talked about in slack (cc @pepicrft, @TadeasKriz),

I'd love to generate an External Build system target (which is technically a PBXLegacyTarget under the hood) via tuist. These allow for running an external tool which can hook into the environment variables used such as $ACTION, to hook into build, clean, debug lifecycles.

An example would be using make $(ACTION) to build a go static library.

Potential solution

No response

macOS version

latest

Tuist version

latest

Xcode version

latest

pepicrft commented 11 months ago

I'd love to generate an External Build system target (which is technically a PBXLegacyTarget under the hood) via tuist. These allow for running an external tool which can hook into the environment variables used such as $ACTION, to hook into build, clean, debug lifecycles.

Hey @fcjr 👋🏼 Feel free to take this one on. Before you write any code, I'd recommend to make a proposal for how the API is going to look to make sure we are all aligned with it. One thing that is very important is that the interface supports indicating the input files/variables the target depends on, what are the output artefacts, and where other targets expect those artefacts to be located. This is very necessary for our caching functionality, which can infer that information automatically when using standard targets, and would need a bit more guidance when using a more custom target.