Skip to content

Locate Robolectric host libraries built by the swiftbuild engine - #121

Closed
piercifani wants to merge 1 commit into
skiptools:mainfrom
piercifani:robolectric-swiftbuild-layout
Closed

piercifani wants to merge 1 commit into
skiptools:mainfrom
piercifani:robolectric-swiftbuild-layout

Conversation

@piercifani

@piercifani piercifani commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

loadPeerLibrary only looked for the Robolectric host library under the native build system's <triple>/debug/ layout. Swift 6.4 made swiftbuild the default SwiftPM engine on Linux, and it writes products to out/Products/Debug-linux-<arch>/ (out/Products/Debug/ on macOS), so every Robolectric test now fails with missing library on CI hosts that moved to a 6.4 toolchain, main included. The loader now tries the native location first, then the two swiftbuild locations, and reports all of them when none exists.

Evidence

Same workflow, same day, on a fork:

Locally (macOS, native engine) the suite still passes 69/69, so the native path is unaffected.

🤖 Generated with Claude Code

loadPeerLibrary only looked under <triple>/debug, the native build
system layout. Swift 6.4 made swiftbuild the default SwiftPM engine on
Linux, and it writes products to out/Products/Debug-linux-<arch> (and
out/Products/Debug on macOS), so every Robolectric test failed with
"missing library" once CI hosts moved to 6.4. Try the swiftbuild
locations after the native one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@piercifani

Copy link
Copy Markdown
Contributor Author

First-party confirmation: today's scheduled run of unchanged main (https://github.com/skiptools/skip-bridge/actions/runs/35982490951) fails both ubuntu jobs with the same missing library signature, so main is red on the hosted runners until this (or an equivalent) lands.

@piercifani

Copy link
Copy Markdown
Contributor Author

Superseded by #119, which already adds the same swiftbuild product-folder fallback to loadPeerLibrary (plus the Android build-system change) and is green on all four jobs. Closing this to avoid two fixes for one problem; #120 now stacks on #119 instead.

@piercifani piercifani closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant