-
Notifications
You must be signed in to change notification settings - Fork 90
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
Generated xcodeproj improvements #77
Generated xcodeproj improvements #77
Conversation
This way, github will collapse diffs & have more accurate repo stats
This way, everything will get chmod’d This fixes back-to-back runs of the installer failing due to permission issues
… in the project This would allow a project to, for example, include a README as a file reference, even though it isnt a src belonging to any particular target
So opening the project in Xcode doesn’t add a new file
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.
Nice one! Lots of goodies in here that help cycle time when working on Bazel projects.
It avoids the warning of the presets not being found
db19402
to
8eee097
Compare
@@ -163,6 +176,7 @@ def _xcodeproj_impl(ctx): | |||
"createIntermediateGroups": True, | |||
"defaultConfig": "Debug", | |||
"groupSortPosition": "none", | |||
"settingPresets": "none", |
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.
fyi to reviewers, this is described here: https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#options
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.
lgtm
@@ -45,7 +45,11 @@ jobs: | |||
- name: Select Xcode 11.2 | |||
run: sudo xcode-select -s /Applications/Xcode_11.2.app | |||
- name: Generate Xcode projects and compare against existing record | |||
run: (bazelisk query 'kind(xcodeproj, tests/macos/xcodeproj/...)' | xargs -n 1 bazelisk run) && git diff --exit-code tests/macos/xcodeproj | |||
run: | |
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.
Nice, more readable! Can we count on all the lines being run in the same shell? Otherwise the set -euo pipefail
might not be taking effect...
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 whole run
string gets executed at once by the shell
set -euxo pipefail | ||
rm -fr {package_name}/{target_name}.xcodeproj | ||
bazel run {package_name}:{target_name} | ||
bazel run {package_name}:{target_name} |
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 running it twice intentional?
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.
yeah, it's testing re-generation (previously that was failing)
@@ -0,0 +1 @@ | |||
*.xcodeproj/ linguist-generated=true |
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 be seeing diffs for the pbxproj
files in this PR?
Should this say /*.xcodeproj/ instead?
Mark xcodeproj directories as generated
This way, github will collapse diffs & have more accurate repo stats
Write all xcodeproj files into the tmp_dest
This way, everything will get chmod’d
This fixes back-to-back runs of the installer failing due to permission issues
Add a test that verifies that projects can regenerate without error
Add support for specifying additional (non-srcs) files to be included in the project
This would allow a project to, for example, include a README as a file reference, even though it isnt a src belonging to any particular target
Download GitHub repos via http_archive
Add IDEWorkspaceChecks.plist to generated projects
So opening the project in Xcode doesn’t add a new file
Include BUILD files in generated Xcode projects
Explicitly opt out of xcodeproj settings presets
It avoids the warning of the presets not being found