Suggested feature: Create .xcfilelist files on request

Allow tuist generate to create .xcfilelist files corresponding to sources, header, resources etc. These files are useful for configuring in build phases so that certain build phases can be skipped if the files in the list haven’t changed. This can speed up some builds.

I believe Tuist would have all the information needed.

Hey @dolfs!

Quick question, how would you use those file lists? I understand what those files are for, but I can’t clearly see how Tuist would set them in build phases.

You can use them in the run script setup as list of files that, if at least one of them has changed, triggers that build phase, but if none has changed, it can skip the step. They are also used to pass the list contents to the script so it can act on the files.

I don’t think Tuist can actually configure them there. I mean I am sure it could configure them in the project, but it simply would not know whether I want to configure them, and where exactly, so there would have to be a way to tell it.

I realize that tuist generate overwrites the project files (that’s the point I guess), so I would need to tell Tuist where to configure them in the Project.swift file. The way I figure that could be done is adding functionality in those places where the project supports it. One such place is in the Target actions. Right now, for example, I have:

actions: [
	.post(path: .relativeToRoot("Build-Phases/"),
		  arguments: ["swiftlint"],
		  name: "BuildExtras")

So the .post and such could accept optional arguments to “inputFileLists” and “outputFileLists” that could then refer to the glob lists collected during generation time.

I think it would work, but I can also see how the payoff would be small compared to the work that would go into this. So, at best, this would be a low priority item.