Bump libdatadog to 36.0.0.1.0 - #5928
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: cb494a1 | Docs | Datadog PR Page | Give us feedback! |
7ce8a0a to
df1e46b
Compare
BenchmarksBenchmark execution time: 2026-06-24 12:05:43 Comparing candidate commit cb494a1 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 1 unstable metrics.
|
df1e46b to
3a259e7
Compare
Bump the pinned libdatadog version in all gemfiles/*.lock to match the gemspec, so the frozen-lockfile CI (#5831) resolves. Also refresh the sha256 checksums in the one lockfile that records a CHECKSUMS section.
tools/yard.gemfile uses `gemspec path: '..'`, so the gemspec bump also applies to the YARD bundle. yard.yml runs bundle install with BUNDLE_GEMFILE=tools/yard.gemfile and BUNDLE_FROZEN=true, so the frozen tools/yard.gemfile.lock must pin the same version or the release deploy fails in Bundler.
TEMPORARY WORKAROUND. libdatadog v36's vendored common.h regressed its header dedup and now emits duplicate typedefs: forward + full-struct collisions for ddog_prof_EncodedProfile, ddog_prof_StringId and OpaqueStringId, plus exact-duplicate opaque typedefs for ddog_prof_StringId2, ddog_prof_MappingId2 and ddog_prof_FunctionId2. These are benign at runtime, but under DATADOG_GEM_CI the extensions compile with -Werror, so the -Wtypedef-redefinition C11 warnings become fatal and break crashtracker.o in both the libdatadog_api and profiling native extensions. Append -Wno-error=typedef-redefinition (keeping it a warning, not an error) to both affected extconfs, gated on DATADOG_GEM_CI like the -Werror it relaxes. Remove this once a fixed common.h ships in libdatadog/libdatadog-rb.
78ed9bc to
c6cac23
Compare
Root causelibdatadog v36 intentionally changed FFE semantics: an invalid/unsupported per-flag config now resolves to caller-default instead of error.
EffectSystem tests
ActionNot a dd-trace-rb or libdatadog defect — system-tests must be updated to the v36 caller-default semantics (owned by FFE team, mirroring ffe-system-test-data#15). Until then, either update/relax those two tests or gate them off for the Ruby weblog so the libdatadog 36 bump can land. |
…36-ffe-parse-error-rb fix(openfeature): map invalid FFE configs to parse errors
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 2 partially typed methods, and clears 1 partially typed method. It decreases the percentage of typed methods from 65.53% to 65.52% (-0.01%). Partially typed methods (+2-1)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
) ## What Enhance the `dedup_headers` dev tool so the generated/bundled `include/datadog/common.h` no longer contains duplicate typedefs. ## Why `dedup_headers` only removed definitions from **child** headers that were byte-identical to ones already present in the **base** header (`common.h`). It never deduplicated definitions **within** the base header. When cbindgen emits the same profiling type from two crate boundaries (e.g. via `after_includes` forward declarations in `libdd-profiling-ffi/cbindgen.toml` plus the regular body definition), the merged `common.h` ends up with duplicate typedefs. These are fatal for consumers compiling with `-Werror -Wtypedef-redefinition` (C11). Two distinct classes were observed in the v36.0.0 artifacts: 1. **Forward + full-struct collision** — a `typedef struct X X;` forward declaration coexisting with the full `typedef struct X { ... } X;`: `ddog_prof_EncodedProfile`, `ddog_prof_StringId`, `OpaqueStringId`. 2. **Exact-duplicate pointer typedefs** emitted twice, identical except that one carries a doc comment (so the existing exact-string dedup keeps both): `ddog_prof_StringId2`, `ddog_prof_MappingId2`, `ddog_prof_FunctionId2`. ## How Add a final pass (`dedup_base_typedefs`) over the assembled base header that: - drops a bare forward `typedef struct/union/enum X X;` when a full-body definition of the same name `X` exists elsewhere in the file (keeping the body, regardless of ordering), and - drops later duplicates of an identical typedef statement, comparing the statement text with any leading doc comment stripped. Opaque forward declarations (no body) and genuine aliases (`typedef struct A B;` with `A != B`) are preserved. This makes `common.h` clean by construction and obsoletes downstream post-processing workarounds (e.g. the one in `libdatadog-rb`). ## Validation Headers were generated via the FFI crates' cbindgen build scripts and run through `dedup_headers` exactly as `builder` invokes it. Before — each of the six types appears twice; clang fails: ``` $ clang -std=gnu99 -Werror -Wtypedef-redefinition -I<out>/include -fsyntax-only t.c common.h:541: error: redefinition of typedef 'ddog_prof_EncodedProfile' ... common.h:909: error: redefinition of typedef 'ddog_prof_StringId2' ... common.h:936: error: redefinition of typedef 'ddog_prof_MappingId2' ... common.h:965: error: redefinition of typedef 'ddog_prof_FunctionId2' ... common.h:1166: error: redefinition of typedef 'OpaqueStringId' ... common.h:1516: error: redefinition of typedef 'ddog_prof_StringId' ... 6 errors generated. ``` After — each type appears exactly once; clang passes (exit 0): ``` ddog_prof_EncodedProfile : 1 ddog_prof_StringId : 1 OpaqueStringId : 1 ddog_prof_StringId2 : 1 ddog_prof_MappingId2 : 1 ddog_prof_FunctionId2 : 1 ``` - `cargo test -p tools --lib` — 20 passed (5 new tests for the dedup pass) - `cargo clippy -p tools --all-targets --all-features -- -D warnings` — clean - `cargo fmt -p tools -- --check` — clean > [!NOTE] > **One of three coordinated changes for the libdatadog v36 duplicate-typedef header issue** (increasing order of permanence): > - [dd-trace-rb#5928](DataDog/dd-trace-rb#5928) — immediate CI mitigation: bump dd-trace-rb to v36 plus a temporary `-Wno-error=typedef-redefinition` stopgap. > - [libdatadog-rb#62](DataDog/libdatadog-rb#62) — gem-level fix: strip the duplicate typedefs during vendoring and ship `36.0.0.1.1`, without waiting for a libdatadog release. > - **This PR** ([libdatadog#2149](#2149)) — upstream fix in `dedup_headers`: makes `common.h` clean by construction and obsoletes the libdatadog-rb post-processing once released. Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com> Co-authored-by: julio.gonzalez <julio.gonzalez@datadoghq.com>

What does this PR do?
Bumps the
libdatadogdependency from~> 35.0.0.1.0to~> 36.0.0.1.0, indatadog.gemspecand the matchingLIBDATADOG_VERSIONconstant inext/libdatadog_extconf_helpers.rb(kept in sync byspec/datadog/core/libdatadog_extconf_helpers_spec.rb), and updates allgemfiles/*.lockplustools/yard.gemfile.lockto match.Motivation:
Pick up the libdatadog 36.0.0 release.
Change log entry
None. (Internal dependency bump; no user-visible behavior change.)
Additional Notes:
Bump libdatadog to 36.0.0.1.0— gemspec + extconf constant + allgemfiles/*.lock(constraint, resolved version, per-platform specs) plus therefreshed
sha256checksums in the one lockfile that records aCHECKSUMSsection, using the values published on RubyGems.org.
Update YARD lockfile for libdatadog 36.0.0.1.0—tools/yard.gemfileinherits the gemspec via
gemspec path: '..', andyard.ymlruns withBUNDLE_FROZEN=true, so its frozen lockfile must pin the same version.gemfiles/*.lockare updated in this PR (not left to the bot). Since Use frozen lockfiles in CI #5831made CI use frozen lockfiles, the pinned
libdatadogversion must alreadymatch in every lockfile or
bundle installfails.Known issue + temporary stopgap
libdatadog v36's vendored
common.hregressed its header dedup and now shipsduplicate typedefs (forward + full-struct collisions for
ddog_prof_EncodedProfile,ddog_prof_StringId,OpaqueStringId, andexact-duplicate opaque typedefs for
ddog_prof_StringId2,ddog_prof_MappingId2,ddog_prof_FunctionId2). These are benign at runtime,but under
DATADOG_GEM_CI=truethe native extensions compile with-Werror,so the
-Wtypedef-redefinition(C11) warnings become fatal and breakcrashtracker.oin both thelibdatadog_apiand profiling native extensions.As a temporary stopgap, the final commit appends
-Wno-error=typedef-redefinition(keeping it a warning, not an error) to theaffected extconfs, gated on
DATADOG_GEM_CIlike the-Werrorit relaxes. Aproper fix — restoring the header dedup so
common.hno longer emits duplicatetypedefs — is being pursued upstream in libdatadog / libdatadog-rb; this
suppression should be removed once a fixed header ships.
How to test the change?
CI (36.0.0.1.0 is published to RubyGems.org). Locally:
DATADOG_GEM_CI=true bundle exec rake clean compile— fails with fatal-Wtypedef-redefinitionerrors after the bump-only commits, and succeeds afterthe stopgap commit.
Note
One of three coordinated changes for the libdatadog v36 duplicate-typedef header issue (increasing order of permanence):
-Wno-error=typedef-redefinitionstopgap.36.0.0.1.1, without waiting for a libdatadog release. Once consumed, the stopgap here can be dropped.dedup_headers: makescommon.hclean by construction; the durable fix.