From eb5ba722873695be4322cd8b8ba319bd34a36903 Mon Sep 17 00:00:00 2001 From: Tyler Beebe Date: Wed, 11 Nov 2026 18:40:02 +0000 Subject: [PATCH] build(rspec): upgrade rb-sys and magnus for newer libclang and unpin ubuntu-24.04 (TRUNK-23633) The ubuntu-26.04 runner image ships clang 20, 21 and 22, and clang-sys loads the newest libclang it finds, so bindgen ran against libclang 22. rb-sys 0.9.124's bindgen 0.69 then emits rb_data_type_struct (and rb_io_t) as opaque structs, and magnus fails to compile against Ruby 3.1's headers. rb-sys 0.9.125 moved rb-sys-build to bindgen 0.72, which generates the full structs (oxidize-rb/rb-sys#712, matsadler/magnus#174). - rb-sys 0.9.124 -> 0.9.130 (crate and rb_sys gem, so rb-sys-dock uses the 0.9.130 images); bindgen 0.69.5 -> 0.72.1 - magnus 0.8.2 -> 0.8.4 in the gem, context and test_report (patch releases; 0.8.4 requires rb-sys ^0.9.124 and fixes a $! crash) - Move ruby.yml's build job back to ubuntu-latest Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ruby.yml | 4 +- Cargo.lock | 54 +++++++------------ context/Cargo.toml | 2 +- rspec-trunk-flaky-tests/Cargo.lock | 44 ++++++--------- rspec-trunk-flaky-tests/Gemfile.lock | 8 +-- .../ext/rspec_trunk_flaky_tests/Cargo.toml | 6 +-- .../rspec_trunk_flaky_tests.gemspec | 2 +- test_report/Cargo.toml | 2 +- 8 files changed, 46 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 58a028de..e3993627 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -36,9 +36,7 @@ jobs: token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} build: - # ubuntu-26.04's libclang 21 makes rb-sys 0.9.124's bindgen emit opaque structs for Ruby 3.1's - # headers, so magnus 0.8.2 fails to compile. Unpin with the rb-sys/magnus upgrade (TRUNK-23633). - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest needs: [dynamic-ci-filter] if: >- !cancelled() && diff --git a/Cargo.lock b/Cargo.lock index a189b593..0fc7f7af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -565,20 +565,18 @@ checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] name = "bindgen" -version = "0.69.5" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ "bitflags 2.10.0", "cexpr", "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", + "itertools 0.13.0", "proc-macro2", "quote", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", "syn 2.0.110", ] @@ -1298,7 +1296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2776,7 +2774,7 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2854,12 +2852,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lexical-parse-float" version = "1.0.6" @@ -3064,9 +3056,9 @@ dependencies = [ [[package]] name = "magnus" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012" +checksum = "e76237a607e1dea288dd0ef0c6c8f49037df2152d14bb52b3542c46522d9e6fc" dependencies = [ "magnus-macros", "rb-sys", @@ -3373,7 +3365,7 @@ dependencies = [ "num-traits", "pyo3", "pyo3-build-config", - "rustc-hash 2.1.1", + "rustc-hash", ] [[package]] @@ -4214,7 +4206,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", "socket2 0.6.5", "thiserror 2.0.21", @@ -4234,7 +4226,7 @@ dependencies = [ "lru-slab", "rand 0.9.2", "ring", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", "rustls-pki-types", "slab", @@ -4360,18 +4352,18 @@ dependencies = [ [[package]] name = "rb-sys" -version = "0.9.117" +version = "0.9.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44" +checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb" dependencies = [ "rb-sys-build", ] [[package]] name = "rb-sys-build" -version = "0.9.117" +version = "0.9.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59" +checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694" dependencies = [ "bindgen", "lazy_static", @@ -4384,9 +4376,9 @@ dependencies = [ [[package]] name = "rb-sys-env" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6" +checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a" [[package]] name = "redox_syscall" @@ -4565,12 +4557,6 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.1.1" @@ -4596,7 +4582,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5409,7 +5395,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -6418,7 +6404,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] diff --git a/context/Cargo.toml b/context/Cargo.toml index cd11a0e7..f0285360 100644 --- a/context/Cargo.toml +++ b/context/Cargo.toml @@ -42,7 +42,7 @@ thiserror = "1.0.63" tsify-next = { version = "0.5.4", optional = true } uuid = { version = "1.10.0", features = ["v5", "v8"] } wasm-bindgen = { version = "0.2.95", optional = true } -magnus = { version = "0.8.2", optional = true, default-features = false } +magnus = { version = "0.8.4", optional = true, default-features = false } proto = { path = "../proto" } prost-wkt-types = { version = "0.5.1", features = ["vendored-protox"] } tracing = "0.1.41" diff --git a/rspec-trunk-flaky-tests/Cargo.lock b/rspec-trunk-flaky-tests/Cargo.lock index 54819cc3..34acd2ec 100644 --- a/rspec-trunk-flaky-tests/Cargo.lock +++ b/rspec-trunk-flaky-tests/Cargo.lock @@ -388,20 +388,18 @@ checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] name = "bindgen" -version = "0.69.5" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ "bitflags 2.10.0", "cexpr", "clang-sys", "itertools 0.12.1", - "lazy_static", - "lazycell", "proc-macro2", "quote", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", "syn 2.0.114", ] @@ -2403,12 +2401,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.191" @@ -2548,13 +2540,13 @@ dependencies = [ [[package]] name = "magnus" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012" +checksum = "e76237a607e1dea288dd0ef0c6c8f49037df2152d14bb52b3542c46522d9e6fc" dependencies = [ "magnus-macros", "rb-sys", - "rb-sys-env 0.2.2", + "rb-sys-env 0.2.3", "seq-macro", ] @@ -3443,7 +3435,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", "socket2", "thiserror 2.0.21", @@ -3464,7 +3456,7 @@ dependencies = [ "rand 0.10.2", "rand_pcg", "ring", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", "rustls-pki-types", "slab", @@ -3485,7 +3477,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -3587,18 +3579,18 @@ dependencies = [ [[package]] name = "rb-sys" -version = "0.9.124" +version = "0.9.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85c4188462601e2aa1469def389c17228566f82ea72f137ed096f21591bc489" +checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb" dependencies = [ "rb-sys-build", ] [[package]] name = "rb-sys-build" -version = "0.9.124" +version = "0.9.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568068db4102230882e6d4ae8de6632e224ca75fe5970f6e026a04e91ed635d3" +checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694" dependencies = [ "bindgen", "lazy_static", @@ -3617,9 +3609,9 @@ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb" [[package]] name = "rb-sys-env" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6" +checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a" [[package]] name = "redox_syscall" @@ -3786,12 +3778,6 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.1.1" diff --git a/rspec-trunk-flaky-tests/Gemfile.lock b/rspec-trunk-flaky-tests/Gemfile.lock index 192bc91a..2d033305 100644 --- a/rspec-trunk-flaky-tests/Gemfile.lock +++ b/rspec-trunk-flaky-tests/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: rspec_trunk_flaky_tests (0.0.0) - rb_sys (= 0.9.124) + rb_sys (= 0.9.130) rspec-core (> 3.3) GEM @@ -12,9 +12,9 @@ GEM rake (13.2.1) rake-compiler (1.3.1) rake - rake-compiler-dock (1.11.0) - rb_sys (0.9.124) - rake-compiler-dock (= 1.11.0) + rake-compiler-dock (1.12.0) + rb_sys (0.9.130) + rake-compiler-dock (= 1.12.0) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) diff --git a/rspec-trunk-flaky-tests/ext/rspec_trunk_flaky_tests/Cargo.toml b/rspec-trunk-flaky-tests/ext/rspec_trunk_flaky_tests/Cargo.toml index dd7a5992..183bb6e5 100644 --- a/rspec-trunk-flaky-tests/ext/rspec_trunk_flaky_tests/Cargo.toml +++ b/rspec-trunk-flaky-tests/ext/rspec_trunk_flaky_tests/Cargo.toml @@ -9,9 +9,9 @@ crate-type = ["cdylib"] [dependencies] anyhow = "1.0.93" context = { path = "../../../context", features = ["git-access", "ruby"] } -magnus = { version = "0.8.2" } +magnus = { version = "0.8.4" } test_report = { path = "../../../test_report", features = ["ruby"] } -rb-sys = { version = "=0.9.124", features = [ +rb-sys = { version = "=0.9.130", features = [ "link-ruby", "bindgen-rbimpls", "bindgen-deprecated-types", @@ -21,7 +21,7 @@ sentry = { version = "=0.36.0", features = ["debug-images"] } sentry-log = "=0.36.0" [dev-dependencies.magnus] -version = "0.8.2" +version = "0.8.4" features = ["rb-sys", "embed"] [build-dependencies] diff --git a/rspec-trunk-flaky-tests/rspec_trunk_flaky_tests.gemspec b/rspec-trunk-flaky-tests/rspec_trunk_flaky_tests.gemspec index c4cc2ed9..cdc69419 100644 --- a/rspec-trunk-flaky-tests/rspec_trunk_flaky_tests.gemspec +++ b/rspec-trunk-flaky-tests/rspec_trunk_flaky_tests.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.email = 'support@trunk.io' s.files = Dir['lib/**/*.rb', 'ext/**/*.{rs,rb}', '**/Cargo.*'] s.add_runtime_dependency('rspec-core', '>3.3') - s.add_dependency('rb_sys', '=0.9.124') + s.add_dependency('rb_sys', '=0.9.130') s.add_development_dependency('rspec') s.homepage = 'https://docs.trunk.io/flaky-tests/get-started/frameworks/rspec' s.metadata['source_code_uri'] = 'https://github.com/trunk-io/analytics-cli/tree/main/rspec-trunk-flaky-tests' diff --git a/test_report/Cargo.toml b/test_report/Cargo.toml index 70ea6a2c..86cd49c0 100644 --- a/test_report/Cargo.toml +++ b/test_report/Cargo.toml @@ -8,7 +8,7 @@ edition = "2024" wasm-bindgen = { version = "0.2.95", optional = true } js-sys = { version = "0.3", optional = true } third-party = { path = "../third-party" } -magnus = { version = "0.8.2", optional = true, default-features = false } +magnus = { version = "0.8.4", optional = true, default-features = false } proto = { path = "../proto" } trunk-analytics-cli = { path = "../cli" } prost-wkt-types = { version = "0.5.1", features = ["vendored-protox"] }