Thoughts, reflections, and ideas

Project description helpers

Posted on

Yesterday I had a pairing session with a good friend of mine who started introducing Tuist to his company's project. He brought up an interesting need that had been in the backlog for quite some time but that no one embarked on building it: reusing code across manifests.

I was so eager to build that feature into Tuist that I immediately proposed him to pair on it. It was a very fruitful exercise that we couldn't finish but got a fully functional prototype. If was excited before building it, my excitement skyrocketed when I saw it working.

In a nutshell, the solution that we adopted was compiling all the files under the Tuist/ProjectDescriptionHelpers in a module, and then linking the manifest against it. I think it's a simple solution, yet powerful.

With this feature developers can not only reuse code across manifests, but leverage any language abstractions to codify their projects: struct, classes, functions, enums, generics...

Here are some things that the new feature enables:

Can't wait to finish it up and bring it to the users in the next version of Tuists. Until then, there are sone tests to add and documentation to write.

Happy coding!