Skip to content

Add imports that required once frameworks become modules #15698

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 1 commit into from
Jun 2, 2025

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Jun 2, 2025

Description

When moving from frameworks to Swift packages, see for example #15622 and #15651, we lose the framework headers which had statements like #import <Foundation/Foundation.h>. This means that basic frameworks such as
Foundation and UIKit are no longer imported as part of consumers frameworks such as Yosemite. To simplify the code review of the upcoming PRs migrating those frameworks to Swift packages in Modules/, this PR preemptively adds the required imports in the files that need them.

This was done by running git reset trunk on the workbench branch temp-branch-for-swiftpm-migration and only committing the import additions in this branch.

Closes https://linear.app/a8c/issue/AINFRA-673

Steps to reproduce

Testing information

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@dangermattic
Copy link
Collaborator

dangermattic commented Jun 2, 2025

1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 🚫 Danger

When moving from frameworks to Swift packages, see for example
#15622 and
#15651, we lose the
framework headers which had statements like `#import
<Foundation/Foundation.h>`. This means that basic frameworks such as
Foundation and UIKit are no longer imported as part of consumers
frameworks such as Yosemite. To simplify the code review of the upcoming
PRs migrating those frameworks to Swift packages in `Modules/`, this PR
preemptively adds the required imports in the files that need them.

This was done by running `git reset trunk` on the workbench branch
`temp-branch-for-swiftpm-migration` and only committing the `import`
additions in this branch.
@mokagio mokagio force-pushed the mokagio/add-required-imports branch from 0a010be to 29e012c Compare June 2, 2025 03:40
@mokagio mokagio changed the base branch from ainfra-471-move-experiments-to-modules to trunk June 2, 2025 03:40
@mokagio mokagio marked this pull request as ready for review June 2, 2025 03:49
@mokagio mokagio added this to the 22.6 milestone Jun 2, 2025
@mokagio mokagio added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Jun 2, 2025
@mokagio mokagio self-assigned this Jun 2, 2025
@mokagio mokagio requested review from a team June 2, 2025 03:49
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Number30199
VersionPR #15698
Bundle IDcom.automattic.alpha.woocommerce
Commit29e012c
Installation URL2u06uiavemja0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@mokagio mokagio enabled auto-merge June 2, 2025 08:57
@mokagio mokagio merged commit 5940b5c into trunk Jun 2, 2025
20 of 21 checks passed
@mokagio mokagio deleted the mokagio/add-required-imports branch June 2, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants