Skip to content

Restore Wormholy, now installed via a fork supporting latest SPM #15771

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Jun 17, 2025

Description

See removal PR #15668 and Wormholy PR pmusolino/Wormholy#154

https://linear.app/a8c/issue/AINFRA-606

Steps to reproduce & Testing information

Run on a device to verify it works

image

image


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

@mokagio mokagio added this to the 22.7 milestone Jun 17, 2025
@mokagio mokagio self-assigned this Jun 17, 2025
@mokagio mokagio added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Jun 17, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 18, 2025

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 Number30583
VersionPR #15771
Bundle IDcom.automattic.alpha.woocommerce
Commitb67de20
Installation URL659k42vj46eg0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@mokagio mokagio marked this pull request as ready for review June 18, 2025 00:50
@mokagio mokagio force-pushed the ainfra-606-try-the-wormholy-swiftpm-pr branch from f25a1d5 to 8a2d783 Compare June 18, 2025 01:07
@mokagio mokagio requested review from jaclync and a team June 18, 2025 01:14
Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

Thanks for adding it back, I can access the tool again! Tested in iPad simulator and device, the popover behavior is a bit off but still usable. I just had a question about if it's possible to exclude it in the release builds, but if it doesn't affect the build size / performance it's fine to include it.

static let launchWormHolyDebug = NSLocalizedString(
"Launch Wormholy Debug",
comment: "Opens an internal library called Wormholy. Not visible to users."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we don't have to localize this string as this is developer-facing.

@@ -65,6 +65,7 @@ let package = Package(
.package(url: "https://github.com/markiv/SwiftUI-Shimmer", from: "1.0.0"),
.package(url: "https://github.com/nalexn/ViewInspector", from: "0.10.0"),
.package(url: "https://github.com/onevcat/Kingfisher", from: "7.6.2"),
.package(url: "https://github.com/pmusolino/Wormholy", from: "2.0.0"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering, can the package not get included in production builds in SPM? I tried building the app with the release build configuration and I still saw the related files being built. Not sure if the final build is optimized so that unused packages are removed, or this is just not supported in SPM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, Swift package manager does not support conditional compilation.

I know Apple does post processing of the IPA we send them, but I don't know if it removes unused frameworks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, Swift package manager does not support conditional compilation.

Actually, maybe I'm wrong, see https://developer.apple.com/documentation/packagedescription/buildsettingcondition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out I was right... Unfortunately.

SwiftPM allows conditional platform dependencies, but not conditional configurations.

See https://github.com/swiftlang/swift-evolution/blob/main/proposals/0273-swiftpm-conditional-target-dependencies.md which proposed both but is marked as implemented only for platform conditions.

It was possible at some point, but the capability was removed swiftlang/swift-package-manager#2598

@mokagio mokagio force-pushed the ainfra-606-try-the-wormholy-swiftpm-pr branch from 8a2d783 to b67de20 Compare June 19, 2025 05:12
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.

3 participants