Skip to content

Remove "Check for Nested Frameworks" build phase #8134

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

Merged
merged 4 commits into from
Nov 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion WooCommerce/WooCommerce.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9491,10 +9491,11 @@
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/check-for-nested-frameworks.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -euo pipefail";
shellScript = "${PROJECT_DIR}/../Scripts/check-nested-frameworks.sh\n";
shellScript = "${PROJECT_DIR}/../Scripts/check-nested-frameworks.sh\n\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen on a clean build if the script fails? 🤔 Does Xcode exit as well (equivalent to set -e) or runs the echo command anyway?

Copy link
Contributor Author

@iamgabrielma iamgabrielma Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's a good point, Xcode will run the echo no matter if check-nested-frameworks.sh exits with 0 or other value, so will always print "SUCCESS" to the output file.

In this case, we could write the result of the input file into the output file.

echo `${SCRIPT_INPUT_FILE_0}` > ${SCRIPT_OUTPUT_FILE_0}

So when we go to the check-for-nested-frameworks.txt file, we can see the actual message that the script returned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting.

In this case, we could write the result of the input file into the output file.

echo `${SCRIPT_INPUT_FILE_0}` > ${SCRIPT_OUTPUT_FILE_0}

Have you considered using tee?

./${SCRIPT_INPUT_FILE_0} | tee ${SCRIPT_OUTPUT_FILE_0}

Also, I can't see an input file in the list in this diff. Perhaps this would achieve logging the script run result to file?

${PROJECT_DIR}/../Scripts/check-nested-frameworks.sh | tee ${SCRIPT_OUTPUT_FILE_0}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered using tee?

I didn't know that one, thanks!

showEnvVarsInLog = 0;
};
3F50FE4528CAEE9F00C89201 /* Enforce AppLocalizedString usages */ = {
Expand Down