Skip to content
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

Add build phase to detect nested frameworks #21130

Merged

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Jul 18, 2023

The Hermes nested framework issue that gave us some grief could have been avoided if we had preemptively checked against that kind of setup.

The issue should be fixed now (either via #21021 or #21128) but we can benefit with this check to avoid paying the price again in the future.

How to test

See #21129 picking up the issue in the "faulty" Gutenberg version.


Regression Notes

  1. Potential unintended areas of impact – N.A.
  2. What I did to test those areas of impact (or what existing automated tests I relied on) – N.A.
  3. What automated tests I added (or what prevented me from doing so) – N.A.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes. N.A.
  • I have considered adding accessibility improvements for my changes. N.A.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary. N.A.

UI changes testing checklist: Not a UI PR.

Comment on lines +1 to +3
#!/bin/sh -eu

set pipefail
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only now notice that the shebang doesn't use Bash. Possibly why I ShellCheck warned me about having pipefail in there.

runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$SRCROOT/../Scripts/BuildPhases/LintNestedFrameworks.sh\"\n";
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the build phase in both WordPress and Jetpack. We cannot run this before building the apps in a centralized aggregated target because the script looks into the target's frameworks.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jul 18, 2023

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr21130-723f8ed
Version22.7
Bundle IDorg.wordpress.alpha
Commit723f8ed
App Center BuildWPiOS - One-Offs #6425
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jul 18, 2023

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr21130-723f8ed
Version22.7
Bundle IDcom.jetpack.alpha
Commit723f8ed
App Center Buildjetpack-installable-builds #5453
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@mokagio mokagio modified the milestones: 22.9, Someday Jul 19, 2023
@mokagio mokagio added the Tooling Build, Release, and Validation Tools label Jul 19, 2023
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

I wonder who wrote that shell script :trollface: but it looks great 😃

See #21129 picking up the issue in the "faulty" Gutenberg version.

👌

I left a comment to suggest keeping the P2 post reference, as it can still be helpful for the screenshots and explanations it provides. Other than that, LGTM 👍

Co-authored-by: Olivier Halligon <olivier.halligon@automattic.com>
@mokagio mokagio merged commit e39537b into mokagio/gutenberg-xcframework-setup Jul 20, 2023
@mokagio mokagio deleted the mokagio/detect-nested-frameworks branch July 20, 2023 03:12
@mokagio
Copy link
Contributor Author

mokagio commented Jul 20, 2023

For the record, I did not miss the RuboCop violation in CI. I decided to ignore it because it's unrelated to the changes in this PR and the Ruby code is being modified elsewhere in #21021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tooling Build, Release, and Validation Tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants