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
[TIMOB-25576] Ensuring usage of macos bundled core utilities and shells when adding to iOS buildPhases #9639
Conversation
Generated by 🚫 dangerJS |
@@ -3177,7 +3177,7 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) { | |||
outputPaths: [], | |||
runOnlyForDeploymentPostprocessing: 0, | |||
shellPath: '/bin/sh', | |||
shellScript: '"cp -rf \\"$PROJECT_DIR/ArchiveStaging\\"/ \\"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/\\""', | |||
shellScript: '"/bin/cp -rf \\"$PROJECT_DIR/ArchiveStaging\\"/ \\"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/\\""', |
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.
There is a possible performance issue with standalone commands. Apple even recommends to not use them and gives some intersting benchmarking-tests. I don't this issue is present for many users, but @janvennemann or @sgtcoolguy may have some more insight here.
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.
I was unaware of a performance difference. Being that it's called a "shellScript", I assumed Xcode was just spawning the command in a shell in which case I don't see why /bin/cp
would be significantly slower than cp
. In the Apple docs, they use the example of the echo
command which writes to stdout and perhaps that's where the speed issue is. cp
doesn't output anything unless the verbose flag is set. So, I'm not terribly concerned with performance.
I guess I'm more concerned why /bin
isn't in your PATH
.
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.
Agreed, we are talking about one iteration of the command here, i think we can neglect the performance impact (if there even is one). We are talking about a few ms at most according to @rlustemberg benches.
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.
Then let‘s take it for 7.0.1!
In my case I've uninstalled the homebrew coreutils package and didn't need the changes in the end. It took me some time to figure out and thought it a good idea to save the problem to someone else , providing a PR. For the record,I've just run some simple benchmarks using 'time' and the difference was negligible,
The results were more or less the same every time, sometimes the standalone command would be faster, sometimes slower. The difference was a few percentile points , definitely not orders of magnitude such as Apple's example of the echo command. It was tested on a computer with AFS and ssd drive. I would expect the difference to be much less on machines with hard drives and HFS (if someone still works on them nowadays) |
Backport: #9663 |
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.
Approved. Passed FR.
JIRA: https://jira.appcelerator.org/browse/TIMOB-25576
Make sure we are using bundled Unix utilities on iOS build phases