Skip to content

[PROF-15559] Add headers for Ruby 2.6 to 3.2 + bump gem version to 3.5.5 - #29

Merged
ivoanjo merged 7 commits into
masterfrom
ivoanjo/import-missing-rubies
Aug 18, 2026
Merged

[PROF-15559] Add headers for Ruby 2.6 to 3.2 + bump gem version to 3.5.5#29
ivoanjo merged 7 commits into
masterfrom
ivoanjo/import-missing-rubies

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Jul 30, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR adds (trimmed) headers for Ruby 2.6 to 3.2.

Motivation:

We're dropping our use of the MJIT headers, and just use the "vendored headers" approach for all Rubies in dd-trace-rb. This will allow us to clean up a number of awkward separate code paths, and in the future should open the door to supporting single step instrumentation (SSI) for the profiler as well.

Additional Notes:

I had opened an earlier version of this PR as a draft. It seems all's fine, so let's move forward.

How to test the change?

This PR pairs with DataDog/dd-trace-rb#6135 for dd-trace-rb to use these headers. Since dd-trace-rb has an hardcoded list of Ruby versions that use MJIT we can release the change on this gem first, and then land the dd-trace-rb side after.

@eregon

eregon commented Jul 31, 2026

Copy link
Copy Markdown
Member

Looks good.
Will need to be rebased on master and rerun add_source + find_includes.rb since #30 requires more sources but also fixed the script which removes more files.

@ivoanjo
ivoanjo force-pushed the ivoanjo/import-missing-rubies branch from 65c0289 to cfbdfc6 Compare August 11, 2026 09:07
@ivoanjo ivoanjo changed the title RFC: Add headers for Ruby 2.6 to 3.1 [PROF-15559] Add headers for Ruby 2.6 to 3.2 + bump gem version to 3.5.5 Aug 11, 2026
@ivoanjo
ivoanjo marked this pull request as ready for review August 11, 2026 09:18
@ivoanjo

ivoanjo commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Hey @eregon can you give a new pass? I've

  • Rebased on top of master + re-did the imports with the latest version of the script
  • Added the missing 3.2 headers
  • Bumped the version so we're ready to release this update

@ivoanjo
ivoanjo enabled auto-merge August 11, 2026 09:19
@ivoanjo
ivoanjo requested a review from eregon August 17, 2026 11:48

@eregon eregon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice.

We need to make sure this doesn't break existing datadog gem releases though (they need to still not use these headers on versions where the MJIT header is included), have you checked that?

@ivoanjo

ivoanjo commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

We need to make sure this doesn't break existing datadog gem releases though (they need to still not use these headers on versions where the MJIT header is included), have you checked that?

Yup:

This dependency is deprecated, but at least let's use a modern version
of the deprecated gem...
Also add `missing/stdbool.h` to `find_includes.rb`'s `KNOWN_MISSING` list: Ruby 2.7.0's internal.h has a `#ifdef HAVE_STDBOOL_H ... #else include "missing/stdbool.h" #endif` fallback that isn't shipped by our Rakefile and is dead code on any platform with a real stdbool.h (which we always have).
@ivoanjo
ivoanjo force-pushed the ivoanjo/import-missing-rubies branch from 160a8de to 800aacf Compare August 18, 2026 10:02
@ivoanjo

ivoanjo commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

I've force-pushed a rebase on top of master with no changes to re-sign the commits, as the ones I had done in my workspace were missing the signature.

@ivoanjo
ivoanjo merged commit d1b0b24 into master Aug 18, 2026
41 checks passed
@ivoanjo
ivoanjo deleted the ivoanjo/import-missing-rubies branch August 18, 2026 10:03
@eregon

eregon commented Aug 18, 2026

Copy link
Copy Markdown
Member

Realized now:

- { ruby_version: '2.6', expected_exit_code: 0 } # using MJIT headers
- { ruby_version: '2.7', expected_exit_code: 0 } # using MJIT headers
- { ruby_version: '3.0', expected_exit_code: 0 } # using MJIT headers
- { ruby_version: '3.1', expected_exit_code: 0 } # using MJIT headers
- { ruby_version: '3.2', expected_exit_code: 0 } # using MJIT headers
needs an update, the comment is outdated (also git grep -i MJIT) but also we should test both 2.6.0 and 2.6 like it's done for 3.4, and same for other versions changed.

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.

2 participants