Skip to content

ruby: make bigdecimal a development dependency - #28928

Closed
mwear wants to merge 1 commit into
protocolbuffers:mainfrom
mwear:ruby-bigdecimal-dev-dependency
Closed

ruby: make bigdecimal a development dependency#28928
mwear wants to merge 1 commit into
protocolbuffers:mainfrom
mwear:ruby-bigdecimal-dev-dependency

Conversation

@mwear

@mwear mwear commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #28927

I ran into this while packaging the OpenTelemetry Ruby auto-instrumentation as a prebuilt gem bundle (see #28927 for the full write up). The tl;dr: bigdecimal is only used by the test suite, so it only needs to be a development dependency. The only references are:

require 'bigdecimal'

m.duration = BigDecimal("5")

As a runtime dependency it causes pain for anyone vendoring the gem. bigdecimal is a native extension with no precompiled build, so it has to be compiled from source for each Ruby ABI, making it the one gem that stops a prebuilt bundle from working across Ruby versions, despite never being loaded at runtime.

This PR moves bigdecimal from a runtime to a development dependency. For consistency it also moves bigdecimal into the test group in the Gemfile, since that's the only environment that needs it.

@mwear
mwear requested a review from a team as a code owner July 30, 2026 21:26
@mwear
mwear requested review from JasonLunn and removed request for a team July 30, 2026 21:26
@google-cla

google-cla Bot commented Jul 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@JasonLunn JasonLunn added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Jul 31, 2026
@github-actions github-actions Bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Jul 31, 2026
@copybara-service copybara-service Bot closed this in ae3f25c Aug 1, 2026
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.

ruby: bigdecimal is a runtime dependency but only used by tests

2 participants