You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes there are scenarios when you need to add a reference to a file in .pbxproj before it appears in the project. For example, when there is a Run Script in the Build Phase of the target that generates the content of this file. Usually such files are added to .gitignore
A more practical example: SwiftGen, Apollo GraphQL
We do not use the resource generation offered by Tuist, as it is more convenient for us to generate files with each project compilation using SwiftGen directly.
Problem
When cloning the project on CI workspace or the first cloning of the project by a new team member, an error occurs: _SomeStrings+Generated.swift not found._
The current workaround is to write a separate bash script that creates dummy files before tuist generate so that Tuist can link them in .pbxproj. The disadvantage of this solution is that we don't have the ability to get a project graph to automatically find targets with a script in BuildPhase that uses SwiftGen tool – consequently, we have to manually hardcode paths for all such targets.
Proposal
Since .pbxproj allows adding references to non-existent file paths, I suggest unlocking the ability to specify such weak paths.
But so as not to violate the current logic of Tuist (checking for the presence of files at the specified path), a new parameter weak needs to be added:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Motivation
Sometimes there are scenarios when you need to add a reference to a file in
.pbxproj
before it appears in the project. For example, when there is aRun Script
in the Build Phase of the target that generates the content of this file. Usually such files are added to.gitignore
A more practical example: SwiftGen, Apollo GraphQL
We do not use the resource generation offered by Tuist, as it is more convenient for us to generate files with each project compilation using SwiftGen directly.
Problem
When cloning the project on CI workspace or the first cloning of the project by a new team member, an error occurs: _SomeStrings+Generated.swift not found._
The current workaround is to write a separate bash script that creates dummy files before
tuist generate
so that Tuist can link them in .pbxproj
.The disadvantage of this solution is that we don't have the ability to get a project graph to automatically find targets with a script in BuildPhase that uses SwiftGen tool – consequently, we have to manually hardcode paths for all such targets.
Proposal
Since
.pbxproj
allows adding references to non-existent file paths, I suggest unlocking the ability to specify such weak paths.But so as not to violate the current logic of Tuist (checking for the presence of files at the specified path), a new parameter
weak
needs to be added:Lint Rules:
Beta Was this translation helpful? Give feedback.
All reactions