Skip to content

fix(bindgen): drop ext-php-rs-clang-sys fork to unblock clang-sys consumers#741

Merged
ptondereau merged 1 commit into
masterfrom
fix/740-drop-clang-sys-fork
May 23, 2026
Merged

fix(bindgen): drop ext-php-rs-clang-sys fork to unblock clang-sys consumers#741
ptondereau merged 1 commit into
masterfrom
fix/740-drop-clang-sys-fork

Conversation

@ptondereau
Copy link
Copy Markdown
Member

Description

Bump ext-php-rs-bindgen to 0.72.1-extphprs.2, which depends on upstream clang-sys instead of the ext-php-rs-clang-sys fork. The fork retained links = "clang" from upstream clang-sys, so projects depending on ext-php-rs could not coexist in the same Cargo graph with any crate that also pulls in clang-sys (bindgen, boring-sys, aws-lc-sys, rdkafka, and anything else built on top of bindgen).

The preserve_none calling convention is matched numerically in the bindgen fork (cc as u32 == 20), so the fork never references any clang-sys-fork-only symbol, which makes pointing the bindgen fork back at upstream clang-sys = "1" safe. As a belt-and-suspenders, ext-php-rs-clang-sys has also been republished as 1.8.1-extphprs.2 with its links = "clang" removed, so any consumer that still ends up with it transitively is no longer wedged either.

Verified locally:

  • Reproduced the original conflict with 0.15.13 paired with bindgen 0.72 in a scratch crate.
  • With this branch the conflict is gone; cargo tree shows only upstream clang-sys v1.8.1 shared between bindgen and ext-php-rs-bindgen, with no ext-php-rs-clang-sys anywhere in the graph.
  • cargo test --lib passes 76/76 and cargo build --example hello_world succeeds against PHP 8.5.2-dev.

Fixes #740.

Checklist

@coveralls
Copy link
Copy Markdown

coveralls commented May 23, 2026

Coverage Report for CI Build 26338262295

Coverage decreased (-0.02%) to 66.207%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 3 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
src/internal/mod.rs 3 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 13065
Covered Lines: 8650
Line Coverage: 66.21%
Coverage Strength: 33.38 hits per line

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 23, 2026

🐰 Bencher Report

Branchfix/740-drop-clang-sys-fork
TestbedPHP 8.4.21 (cli) (built: May 15 2026 00:31:53) (NTS)

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

🐰 View full continuous benchmarking report in Bencher

ext-php-rs-bindgen 0.72.1-extphprs.2 now depends on upstream clang-sys
instead of the renamed ext-php-rs-clang-sys fork. The fork retained the
links = "clang" declaration of upstream clang-sys, which meant projects
depending on ext-php-rs could not coexist in the same Cargo graph with
any crate that also pulls in clang-sys (bindgen, boring-sys, aws-lc-sys,
rdkafka, ...). The preserve_none calling convention is matched
numerically inside the bindgen fork, so dropping the clang-sys fork is
safe.

Fixes #740
@ptondereau ptondereau force-pushed the fix/740-drop-clang-sys-fork branch from 8c2f551 to b69ef1a Compare May 23, 2026 16:49
@ptondereau ptondereau merged commit 96a6d70 into master May 23, 2026
83 of 133 checks passed
@ptondereau ptondereau deleted the fix/740-drop-clang-sys-fork branch May 23, 2026 17:38
@Xenira Xenira mentioned this pull request May 23, 2026
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.

ext-php-rs 0.15.13 cannot coexist with crates using clang-sys (duplicate links = "clang")

2 participants