Skip to content

Remove main.swift from Keystone - #24383

Merged
kean merged 1 commit into
trunkfrom
task/remove-main-swift
Apr 1, 2025
Merged

Remove main.swift from Keystone#24383
kean merged 1 commit into
trunkfrom
task/remove-main-swift

Conversation

@kean

@kean kean commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

I accidentally added it to the target together with other Classes/. I plan to move it outside of Classes/ eventually.

Note: Keystone will no longer compile because with the removal of main.swift, it changed how Keystone-Swift.h gets generated (Swift APIs available from Objective-C). It now includes only public APIs, and I could not find any way to change it. It is what I would expect considering that the Objective-C umbrella header works the same way – it requires headers included in it to be public.

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

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

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean added the General label Apr 1, 2025
@kean kean added this to the 25.9 milestone Apr 1, 2025
@kean
kean requested review from crazytonyli and mokagio April 1, 2025 17:13
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is assigned to the milestone 25.9. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number26999
VersionPR #24383
Bundle IDcom.jetpack.alpha
Commitf361df4
Installation URL5dq90pnplaeng
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number26999
VersionPR #24383
Bundle IDorg.wordpress.alpha
Commitf361df4
Installation URL0p73j4eulc1ug
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@mokagio mokagio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: Keystone will no longer compile because with the removal of main.swift, it changed how Keystone-Swift.h gets generated (Swift APIs available from Objective-C). It now includes only public APIs, and I could not find any way to change it. It is what I would expect considering that the Objective-C umbrella header works the same way – it requires headers included in it to be public.

Yeah, run in similar constraints with WordPressData. See ##24326 and #24348 and I actually have another one coming from the new #24378

Given Keystone is not currently a dependency of the app targets, the fact it does not compile should not be an issue.

Comment on lines 1906 to +1909
0C5C46F42D98343300F2CD55 /* Exceptions for "Classes" folder in "Keystone" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
System/main.swift,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is says in the tin.

isa = PBXFileSystemSynchronizedRootGroup;
path = WordPressAuthenticatorTests;
sourceTree = "<group>";
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah! Glad you committed this project change. I got it yesterday too but kept thinking "I'll open another PR then one for this one." I didn't want it out in a PR that did not work on the project file...

@kean
kean added this pull request to the merge queue Apr 1, 2025
mokagio added a commit that referenced this pull request Apr 1, 2025
I never looked into it, but apparently the `public` access level for
`@objc` is required in a framework setup for those methods to be
accessible through the `<framework name>-Swift.h` generated header.

We run into the same issue in Keystone, see
#24383
Merged via the queue into trunk with commit 0fb4dd1 Apr 1, 2025
@kean
kean deleted the task/remove-main-swift branch April 1, 2025 18:52
github-merge-queue Bot pushed a commit that referenced this pull request Apr 1, 2025
…4386)

I never looked into it, but apparently the `public` access level for
`@objc` is required in a framework setup for those methods to be
accessible through the `<framework name>-Swift.h` generated header.

We run into the same issue in Keystone, see
#24383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants