Skip to content

Support module aliasing FlyingFox and FlyingSocks together - #246

Merged
swhitty merged 1 commit into
swhitty:mainfrom
tonyarnold:fix/module-aliasing
Oct 3, 2026
Merged

swhitty merged 1 commit into
swhitty:mainfrom
tonyarnold:fix/module-aliasing

Conversation

@tonyarnold

Copy link
Copy Markdown
Contributor

If I try to use a Swift package module alias for both FlyingFox and FlyingSocks, it fails to compile because SwiftPM omits the FlyingSocks alias from FlyingFox's compiler command.

This PR proposes a change that declares the existing CSystemLinux target as a direct conditional dependency of FlyingFox so that SwiftPM propagates both aliases.

The target and Linux/Android condition are already used by FlyingSocks. FlyingFox also checks canImport(CSystemLinux) when selecting its default socket pool, so making this dependency explicit matches an existing source-level relationship.

Ultimately, this is a compatibility workaround for SwiftPM's graph propagation bug.

In terms of compatibility:

  • Existing products, module names, public APIs, deployment targets, and Swift source files are unchanged.
  • Apple platforms do not build CSystemLinux because its condition excludes them.
  • Linux/Android gain another edge to the same existing target; there is no new package dependency or duplicate C target. Those platform results still need upstream CI confirmation.

My use case here is bundling FlyingFox into a binary, closed source framework that will be linked into other apps at or post runtime — I am using Swift Package Manager's module aliasing feature to avoid namespace clashes if the user is already including FlyingFox in their app.

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.72%. Comparing base (bd32d43) to head (1eed485).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #246   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files          72       72           
  Lines        3777     3777           
=======================================
  Hits         3540     3540           
  Misses        237      237           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@tonyarnold

Copy link
Copy Markdown
Contributor Author

Thanks, Simon! It looks like Luke has fixes posted for what's failing in CI.

@swhitty
swhitty merged commit 1eed485 into swhitty:main Oct 3, 2026
36 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants