Skip to content

fix: resolve versioned SwiftPM packages without unsafe flags - #189

Merged
efraespada merged 1 commit into
developfrom
bugfix/188-zstandardioszstandardmacos-fail-swiftpm-resolution-zstandardnative-contains-unsafe-build-flags
Nov 2, 2026
Merged

efraespada merged 1 commit into
developfrom
bugfix/188-zstandardioszstandardmacos-fail-swiftpm-resolution-zstandardnative-contains-unsafe-build-flags

Conversation

@efraespada

@efraespada efraespada commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

This removes the unsafe linker flags that prevented SwiftPM from resolving the native package by exact version. A project-owned C shim retains the ten Dart FFI symbols during iOS and macOS plugin registration, and a standalone regression is added to macOS PR and release-candidate validation.

What changed

  • Replaced unsafe linker flags with a C shim that retains all ten Dart FFI entry points under Release dead stripping.
  • Updated iOS and macOS SwiftPM plugin registration to call the retention function; CocoaPods continues using its existing implementation.
  • Added a standalone exact-version SwiftPM regression and wired it into macOS PR and release-candidate validation.
  • Documented the symbol-retention approach and the SwiftPM regression procedure.

Validation

  • Reproduced the unsafe-flags failure before the production change with published version 1.5.5 and Apple Swift 6.4.2.
  • python3 scripts/test_swiftpm_package.py passed after the fix, verifying all ten dynamic symbol lookups and one-shot and streaming roundtrips with Release dead stripping.
  • bash scripts/test_all.sh passed on macOS with Flutter 3.47.2; Linux and Windows-specific tests were skipped on that host.
  • python3 -m unittest discover -s .github/scripts/tests -p test_release_builds.py -v: 10 passed.
  • Dart formatting, dart scripts/check_pub_metadata.dart, and git diff --check passed.

Review notes

  • The full iOS/macOS SwiftPM and CocoaPods matrix, other platform checks, review findings, and Codecov remain merge gates for this commit.

Closes #188

Retain the ten Dart FFI entry points through a C shim linked during Apple plugin registration. Add a version-resolved Release consumer regression with dynamic symbol lookup and roundtrips. Fixes #188.
@docs-page

docs-page Bot commented Nov 2, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/zstandard~189

Documentation is deployed and generated using docs.page

@codecov-commenter

codecov-commenter commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.36%. Comparing base (6168dd9) to head (781ba3c).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #189   +/-   ##
========================================
  Coverage    77.36%   77.36%           
========================================
  Files           14       14           
  Lines         1109     1109           
========================================
  Hits           858      858           
  Misses         251      251           
Flag Coverage Δ
cli 76.61% <ø> (ø)
platform_interface 85.71% <ø> (ø)
zstandard 88.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vypbot vypbot added the state:ai-processing A Copilot agent is analyzing or working on the issue or change. label Nov 2, 2026
@vypbot
vypbot self-requested a review November 2, 2026 19:02
@vypbot vypbot added this to vypdev Nov 2, 2026
@vypbot vypbot moved this to In Progress in vypdev Nov 2, 2026
@vypbot
vypbot changed the base branch from develop to master November 2, 2026 19:02
@vypbot
vypbot changed the base branch from master to develop November 2, 2026 19:02
@vypbot vypbot added the size: XL label Nov 2, 2026
@vypbot

vypbot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Bugbot: review complete

Current status: No active findings on 781ba3c.

Pull request · Verified commit · Workflow run

@vypbot vypbot added state:ready The change is ready for human approval or merge. state:awaiting-maintainer The next action requires a maintainer response or approval. and removed state:ai-processing A Copilot agent is analyzing or working on the issue or change. labels Nov 2, 2026
@vypbot

vypbot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Copilot approval · Human review needed

Status: A protected workflow, policy, or trust-boundary file changed.
Completed: 3/3 observed checks succeeded; Bugbot complete.
Action required: Ask a human reviewer to decide.
Impact: No new approval is confirmed for this revision.
See checks

Technical evidence

Revision: 781ba3c300a5; base: 6168dd938530; reason: protected-path.

@efraespada
efraespada merged commit 8dcfe3f into develop Nov 2, 2026
71 of 79 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in vypdev Nov 2, 2026
@vypbot vypbot added state:verified The change has passed Copilot verification. and removed state:ready The change is ready for human approval or merge. state:awaiting-maintainer The next action requires a maintainer response or approval. labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XL state:verified The change has passed Copilot verification.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐛🧑‍💻 - zstandardioszstandardmacos fail SwiftPM resolution zstandardnative contains unsafe build flags

3 participants