-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Tuist in the Template #37952
Conversation
Summary: [tuist.io](https://tuist.io) is a tool that allows to describe the xcode project-related files using Swift, in a declarative way. This tool solves the problem of working with the xcodeproj files completely, as it abstracts its details. The xcodeproj is notoriously a painful file to work with, especially when multiple engineers works together on the same project, and it is also one of the main sources of frustration for our users when it comes to update an app. This change introduce the `Project.swift` file for the template. However, currently, using tuist has to be done manually, as the RN CLI does not have knowledge of it. Therefore, to make everything work, we are going to commit all the files that tuist generates, to have an atomic commits that works. ## Next Steps: 1. update the CLI so that it can use swift 2. Remove the generated files from the template and add them to the .gitignore. 3. update RN Doctor so that it knows about tuist ## Changelog: [iOS][Added] - Introduce `tuist` in the template Differential Revision: D46711973 fbshipit-source-id: dc904d52fba63198439b988a59c749c8ab55d4a8
This pull request was exported from Phabricator. Differential Revision: D46711973 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration looks good 👋 .pbxproj
👋
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file can be put into .gitignore
. It's automatically generated and not something users should commit. Projects created with tuist init
the whole Derived
folder in .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, as I said in the Next Steps above:
Next Steps:
update the CLI so that it can use tuist
Remove the generated files from the template and add them to the .gitignore.
update RN Doctor so that it knows about tuist
The reason why they are not ignored now is to allow users to use the Xcodeproj without the need of installing tuist. The plan is to ignore them and remove the xcodeproj
as soon as the CLI can handle Tuist properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be gitignored, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to remove pbxproj
later on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. I don't want to remove it right away as it will break CIs that may be running test creating apps starting from the template.
sources: ["HelloWorld/*.m", "HelloWorld/*.mm"], | ||
resources: [ | ||
"HelloWorld/Images.xcassets", | ||
"HelloWorld/LaunchScreen.storyboard"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"HelloWorld/LaunchScreen.storyboard"], | |
"HelloWorld/LaunchScreen.storyboard" | |
], |
|
||
let startPackagerScript = | ||
""" | ||
export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider putting this into a script file to make it easier to edit? Or do we rather want to keep the Xcode project as close as possible to what it used to be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal will be to remove these scripts and have them in separate files.
However, I didn't want to push too many changes in a single sweep... 😅
Should we also include the |
Good call, I forgot about this. It should be owned by the template, imho and the CLI should honour it. |
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
Summary:
tuist.io is a tool that allows to describe the xcode project-related files using Swift, in a declarative way.
This tool solves the problem of working with the xcodeproj files completely, as it abstracts its details.
The xcodeproj is notoriously a painful file to work with, especially when multiple engineers works together on the same project, and it is also one of the main sources of frustration for our users when it comes to update an app.
This change introduce the
Project.swift
file for the template. However, currently, using tuist has to be done manually, as the RN CLI does not have knowledge of it. Therefore, to make everything work, we are going to commit all the files that tuist generates, to have an atomic commits that works.Draft RFC: react-native-community/discussions-and-proposals#672 -> Read it formatted
Next Steps:
Changelog:
[iOS][Added] - Introduce
tuist
in the templateDifferential Revision: D46711973