Skip to content

Enhance APCu include detection for in-tree builds#40

Open
henderkes wants to merge 3 commits into
kjdev:masterfrom
henderkes:master
Open

Enhance APCu include detection for in-tree builds#40
henderkes wants to merge 3 commits into
kjdev:masterfrom
henderkes:master

Conversation

@henderkes

@henderkes henderkes commented Jun 26, 2026

Copy link
Copy Markdown

see kjdev/php-ext-zstd#100

Summary by CodeRabbit

  • Bug Fixes
    • Improved APCu detection during setup so it more accurately finds support when available.
    • Reduced unnecessary setup failures by treating missing APCu support as a non-fatal result in automatic detection mode.
    • Installation now better handles custom source layouts when checking for APCu compatibility.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@henderkes, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d1a6020-97f6-4366-9b3f-073aacee3877

📥 Commits

Reviewing files that changed from the base of the PR and between 531a5b3 and afdd345.

📒 Files selected for processing (1)
  • config.m4
📝 Walkthrough

Walkthrough

config.m4 now checks APCu support only when PHP_APCU is enabled, can fall back to $abs_srcdir for the serializer header, defines HAVE_APCU_SUPPORT when found, and distinguishes missing-header handling for auto versus non-auto settings.

Changes

APCu detection

Layer / File(s) Summary
Conditional APCu header probe
config.m4
config.m4 now gates the APCu header check on PHP_APCU != no, can redirect phpincludedir to $abs_srcdir, defines HAVE_APCU_SUPPORT when ext/apcu/apc_serializer.h is found, and errors only when the header is still missing and PHP_APCU is not auto.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny peeks at config.m4,
Sniffs for the header, then hops once more.
If found, a happy thump-thump rings,
If not, the build chooses gentler things.
Hop hop, the APCu path now sings 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: improving APCu include detection for in-tree builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@henderkes

Copy link
Copy Markdown
Author

Previously it would always silently fail using apcu in in-tree compilation, now it properly detects it.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config.m4`:
- Around line 69-80: Default or declare PHP_APCU before the configure probe in
config.m4 so the feature can correctly behave as auto/no instead of always
entering the APCu check. Update the logic around the existing PHP_APCU
conditional to initialize it to a safe default and, if this is
user-configurable, add the matching PHP_ARG_* declaration so the branch in the
APCu include check and the AC_MSG_ERROR path only run when intended.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7b785e97-e85f-45d9-85f1-6efbaeb826ef

📥 Commits

Reviewing files that changed from the base of the PR and between bf27b2c and 531a5b3.

📒 Files selected for processing (1)
  • config.m4

Comment thread config.m4
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.

1 participant