report if libmaxminddb is bundled or system - #289
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughBundled Unix and Windows builds now define Changeslibmaxminddb labeling
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change accurately reports whether the loaded libmaxminddb is bundled or system-provided without affecting disabled builds. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit checks the library sign Comment |
|
Perhaps version is irrelevant when bundled, so an alternative report is Or |
horgh
left a comment
There was a problem hiding this comment.
Good idea, thank you! I have a few comments.
30ddfe8 to
a97f383
Compare
php_info_print_table_row() emits one cell per argument and no colspan, so the three-argument row added in maxmind#289 was wrong output rather than an unusual layout. In text mode it read libmaxminddb library version => 1.14.0 => (bundled) which has the Directive => Local Value => Master Value shape of an ini table, so the version row stopped being key => value. In HTML it was a three-cell <tr> in a table whose other rows have two, leaving a ragged empty column. The row keeps the shape maxmind#289 intended, with the source as a suffix in the same cell: libmaxminddb library version => 1.14.0 (bundled) Selecting the string ahead of the call also removes the `);` that was duplicated across both #ifdef arms, and the hunk now formats cleanly under .clang-format, whose BinPackArguments: false would otherwise have rewritten it. lint.yml does not run clang-format, so CI had not noticed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The two build files are the most heavily commented in the repository and the AC_DEFINE added in maxmind#289 was the one line in them with no rationale. Worse, config.w32 says a few lines above it that "the Windows build never defines HAVE_CONFIG_H" and that defining it "would make our own maxminddb.c include a config.h that does not exist". A maintainer trusting that prose could reasonably conclude the AC_DEFINE is dead and delete it. It is not: under phpize the value is written to <devpack>\include\main\config.pickle.h and reaches maxminddb.c through php.h, zend_portability.h, zend_config.w32.h and main\config.w32.h, a route that has nothing to do with HAVE_CONFIG_H. Both files now say what the macro is for, why it is defined as 0 rather than left absent on the system path, and, in config.w32, the include chain it travels and the stale-pickle failure that the 0 exists to overwrite. The HAVE_CONFIG_H paragraph points at that comment so the two are not read as contradicting each other. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The new row is user-visible output and maxmind#289 shipped without noting it. 1.14.0 is already released at the top of the file, so this opens the next section, undated until release the way 1.14.0 was. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
As version 1.14.0 now has an option to use the system or bundled library, it could be useful to report it.
Summary by CodeRabbit