Skip to content

Allow concurrent-ruby >= 1.3.7#231

Open
christian-rogobete wants to merge 1 commit into
stellar:masterfrom
Soneso:concurrent-ruby-1.3.7
Open

Allow concurrent-ruby >= 1.3.7#231
christian-rogobete wants to merge 1 commit into
stellar:masterfrom
Soneso:concurrent-ruby-1.3.7

Conversation

@christian-rogobete

@christian-rogobete christian-rogobete commented Jul 18, 2026

Copy link
Copy Markdown

concurrent-ruby was pinned to <= 1.3.4 in #206 because 1.3.5 stopped requiring logger, which activesupport 6 needs at load time (uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger).

concurrent-ruby <= 1.3.4 is affected by GHSA-h8w8-99g7-qmvj (high), GHSA-wv3x-4vxv-whpp (low) and GHSA-6wx8-w4f5-wwcr (low), all fixed in 1.3.7. The pin propagates these Dependabot alerts to downstream consumers of xdrgen, including the Stellar SDK XDR generators.

Changes:

  • require logger in lib/xdrgen.rb before activesupport, which resolves the original load error
  • declare logger as a runtime dependency, since it is no longer a default gem on Ruby >= 3.5
  • raise the concurrent-ruby constraint to >= 1.3.7
  • set required_ruby_version to >= 2.5.0, matching the floor activesupport 6 already imposes
  • update Gemfile.lock accordingly

Tested with bundle exec rspec on Ruby 2.7 and 3.3 (20 examples, 0 failures, no changes under spec/output), and validated against the stellar-ios-mac-sdk Swift XDR generator: full generation with concurrent-ruby 1.3.7 produces byte-identical output.

Copilot AI review requested due to automatic review settings July 18, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates dependencies to safely support concurrent-ruby 1.3.7+ and newer Ruby versions.

Changes:

  • Loads and declares logger explicitly.
  • Raises the secure concurrent-ruby minimum.
  • Refreshes locked dependencies.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
xdrgen.gemspec Updates runtime dependencies.
lib/xdrgen.rb Loads logger before ActiveSupport.
Gemfile.lock Locks updated dependency versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread xdrgen.gemspec
# https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror
spec.add_dependency "concurrent-ruby", "<= 1.3.4"
# >= 1.3.7 fixes GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr
spec.add_dependency "concurrent-ruby", ">= 1.3.7"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in 99390b9: required_ruby_version is now >= 2.5.0, matching the floor activesupport 6 already imposes.

Comment thread xdrgen.gemspec
# >= 1.3.7 fixes GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr
spec.add_dependency "concurrent-ruby", ">= 1.3.7"
# required at load time by lib/xdrgen.rb; no longer a default gem on Ruby >= 3.5
spec.add_dependency "logger"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ruby 3.5 is not released yet (current stable is 3.4.10; 3.5 exists only as a preview), so it cannot go into the required matrix. I also ran the suite on 3.5.0preview1: it fails before reaching this change, because the pry dev dependency hits another Ruby 3.5 default-gem removal (cannot load such file -- ostruct). Bringing xdrgen to Ruby 3.5 therefore needs its own change beyond this security bump; the logger dependency here is forward-looking and has no effect on currently supported Rubies. Happy to follow up with a matrix update once 3.5 is stable, if the maintainers want that.

Require logger before activesupport so that activesupport 6 loads with
concurrent-ruby >= 1.3.5, which no longer requires logger transitively,
and declare logger as a runtime dependency since it is no longer a
default gem on Ruby >= 3.5. Raise the concurrent-ruby constraint to
>= 1.3.7 to pull in the fixes for GHSA-h8w8-99g7-qmvj,
GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr. Set required_ruby_version
to >= 2.5.0, matching the floor activesupport 6 already imposes.
christian-rogobete added a commit to Soneso/stellar-ios-mac-sdk that referenced this pull request Jul 18, 2026
The upstream gemspec caps concurrent-ruby at 1.3.4, which is affected
by GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr.
The fork (proposed upstream in stellar/xdrgen#231) lifts the cap;
generated output is unchanged.
christian-rogobete added a commit to Soneso/stellar-php-sdk that referenced this pull request Jul 18, 2026
The upstream gemspec caps concurrent-ruby at 1.3.4, which is affected
by GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr.
The fork (proposed upstream in stellar/xdrgen#231) lifts the cap;
generated output is unchanged.
christian-rogobete added a commit to Soneso/stellar_flutter_sdk that referenced this pull request Jul 18, 2026
The upstream gemspec caps concurrent-ruby at 1.3.4, which is affected
by GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr.
The fork (proposed upstream in stellar/xdrgen#231) lifts the cap;
generated output is unchanged.
@leighmcculloch
leighmcculloch enabled auto-merge (squash) July 20, 2026 06:08
christian-rogobete added a commit to Soneso/kmp-stellar-sdk that referenced this pull request Jul 20, 2026
The upstream gemspec caps concurrent-ruby at 1.3.4, which is affected
by GHSA-h8w8-99g7-qmvj, GHSA-wv3x-4vxv-whpp and GHSA-6wx8-w4f5-wwcr.
The fork (proposed upstream in stellar/xdrgen#231) lifts the cap;
generated output is unchanged.
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.

3 participants