You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can run the project and run the demo, but there is no way to run the tests.
Even if I manually add testTarget in Package.swift, it won't work.
Because UIKit is heavily referenced in QuickLayoutCore, but MacroTest must run on a Mac.
Thanks a lot for taking a look at the tests and for putting in the effort to get them running!
Just to give a bit of context from Meta’s side: internally we run all QuickLayout tests on every pull request, including snapshot tests, unit tests and macro tests. Unfortunately, when I open-sourced QuickLayout, I wasn’t able to make any of the test running in Package.swift.
The bulk of the original suite lives in server_snapshot_tests, but those tests rely on reference images stored in a private cloud that I can’t make public. Without those images the snapshot suite won’t run, so those files are included mostly for context rather than execution.
I haven’t yet been able as well to run the macro test through SwiftPM in this public repository. The compiler plugin system, SwiftSyntax versioning, and cross-platform constraints (macOS host vs iOS runtime) have been tricky to reconcile. I’ve been experimenting with test targets, disabling prebuilts, platform constraints, and separating the UIKit-only runtime from the macro host, but I haven’t found a clean setup that works in a pure SPM environment.
If you have a working configuration or a PR that solves any piece of this puzzle, I’m more than happy to take a look and merge it.
Thanks again for taking the time to dig into this!
Comment out QuickLayoutCore and QuickLayoutBridge in Package.swift, that's the only way I can
Thanks a lot for taking a look at the tests and for putting in the effort to get them running!
Just to give a bit of context from Meta’s side: internally we run all QuickLayout tests on every pull request, including snapshot tests, unit tests and macro tests. Unfortunately, when I open-sourced QuickLayout, I wasn’t able to make any of the test running in Package.swift.
The bulk of the original suite lives in server_snapshot_tests, but those tests rely on reference images stored in a private cloud that I can’t make public. Without those images the snapshot suite won’t run, so those files are included mostly for context rather than execution.
I haven’t yet been able as well to run the macro test through SwiftPM in this public repository. The compiler plugin system, SwiftSyntax versioning, and cross-platform constraints (macOS host vs iOS runtime) have been tricky to reconcile. I’ve been experimenting with test targets, disabling prebuilts, platform constraints, and separating the UIKit-only runtime from the macro host, but I haven’t found a clean setup that works in a pure SPM environment.
If you have a working configuration or a PR that solves any piece of this puzzle, I’m more than happy to take a look and merge it.
Thanks again for taking the time to dig into this!
Activity
mlch911 commentedon Nov 28, 2025
Only after I comment out
QuickLayoutCoreandQuickLayoutBridgeinPackage.swift, I can run the tests.constantine-fry commentedon Nov 29, 2025
Thanks a lot for taking a look at the tests and for putting in the effort to get them running!
Just to give a bit of context from Meta’s side: internally we run all QuickLayout tests on every pull request, including snapshot tests, unit tests and macro tests. Unfortunately, when I open-sourced QuickLayout, I wasn’t able to make any of the test running in Package.swift.
The bulk of the original suite lives in server_snapshot_tests, but those tests rely on reference images stored in a private cloud that I can’t make public. Without those images the snapshot suite won’t run, so those files are included mostly for context rather than execution.
I haven’t yet been able as well to run the macro test through SwiftPM in this public repository. The compiler plugin system, SwiftSyntax versioning, and cross-platform constraints (macOS host vs iOS runtime) have been tricky to reconcile. I’ve been experimenting with test targets, disabling prebuilts, platform constraints, and separating the UIKit-only runtime from the macro host, but I haven’t found a clean setup that works in a pure SPM environment.
If you have a working configuration or a PR that solves any piece of this puzzle, I’m more than happy to take a look and merge it.
Thanks again for taking the time to dig into this!
mlch911 commentedon Dec 1, 2025
Comment out QuickLayoutCore and QuickLayoutBridge in Package.swift, that's the only way I can
Done. #4
Run test (#4)