Replies: 6 comments 5 replies
-
Hey @jsorge 👋 This makes me think whether we should continue down this path long-term, or we should expose a more flexible API where we give developers full control over those actions. I'm curious to know what @tuist/core thinks about this. |
Beta Was this translation helpful? Give feedback.
-
I initially had the urge of doing the same as @jsorge but learned that it's not possible. This was a bit of a bummer. On one hand I feel like it should be possible, but on the other I think that it could lead to bad project structure. In general I think it's a good enforcement @pepibumur 👍 since build scripts are too important to get buried within the project's configuration files. Keeping those separate makes sense to me because they are more visible at a project level, which feels appropriate considering how essential builds are to project workflows. That being said I also see @jsorge's point in context of small scripts that relay the build script logic to some larger external scripts and only need a trigger from within Xcode. From this perspective it does feel redundant to proxy such a script. |
Beta Was this translation helpful? Give feedback.
-
I'm all aboard the "don't write massive scripts in Xcode" train for sure, and also agree that making these diffable in code reviews is a big win. I wonder if there's then room for a sub-type that is explicitly for a small script like what I'm after. That way Tuist gets out of the way of its user who's trying to get their work done, and it provides an intent for the people reviewing usages of that type in a user's code review. I like that Tuist is opinionated enough to encourage good organization, but it also needs to allow people to do what they're gonna do otherwise it starts becoming more of a hindrance. |
Beta Was this translation helpful? Give feedback.
-
I think this is currently possible, although a little bit hacky: But I agree that the restricting API is probably making the life of users a little bit harder than necessary, so I am for augmenting it. Something like I think it should be fairly easy to implement, would you like to have a stab at it, @jsorge? (the final API is up to debate, of course) |
Beta Was this translation helpful? Give feedback.
-
I can take a shot at it this week I think. Mind pointing me to where I can start? |
Beta Was this translation helpful? Give feedback.
-
I made the PR for this #2192 I'm not sure exactly where to update the docs though. Is that the markdown section of the website folder? |
Beta Was this translation helpful? Give feedback.
-
I've got a target which has a build action to run a command at our repo's root (we have a Makefile there which holds our commands that we automate). I'd like to duplicate this in a Tuist
TargetAction
but it looks like that can only reference a file on disk rather than support embedding the content of the script itself (I'm totally in the camp of using scripts outside of Xcode BTW!). Here's what it currently looks like in our existing project that I'm migrating:Is it possible to do this in Tuist or do I need to make a script which then can run those 2 lines (which I'm hoping I don't have to do). Thanks!
Beta Was this translation helpful? Give feedback.
All reactions