Skip to content

WA-FORWARD-004: Move Ruby 3.4 stdlib gem deps from Gemfile to gemspec #780

@kitcommerce

Description

@kitcommerce

Issue

PR #778 (Ruby 3.4 compat check) added 5 stdlib gems to the root Gemfile as a workaround:

  • mutex_m
  • csv
  • drb
  • logger
  • ostruct

These should properly live in core/workarea-core.gemspec as add_dependency entries. Downstream implementations that use Ruby 3.4 would otherwise need to add these manually to their own Gemfiles.

Why

When workarea-core is installed as a gem (not path-referenced), downstream implementations inherit its gemspec dependencies but not its root Gemfile. The stdlib gems need to be declared where they'll propagate to consumers.

Fix

Move from Gemfile:

gem 'mutex_m'
gem 'csv'
gem 'drb'
gem 'logger'
gem 'ostruct'

To core/workarea-core.gemspec:

s.add_dependency 'mutex_m'  # Ruby 3.4+: no longer stdlib
s.add_dependency 'csv'       # Ruby 3.4+: no longer stdlib  
s.add_dependency 'drb'       # Ruby 3.4+: no longer stdlib
s.add_dependency 'logger'    # Ruby 3.4+: no longer stdlib
s.add_dependency 'ostruct'   # Ruby 3.4+: no longer stdlib

And keep the root Gemfile clean (or remove the explicit entries since they'd come through gemspec).

Note

Long-term, upgrading to activesupport 7+ (part of the Rails 7 upgrade path) resolves the mutex_m/drb issue at the source since Rails 7 properly declares these deps. The csv and others used in workarea-core itself still need explicit declaration.

Acceptance Criteria

  • Stdlib gems moved to workarea-core.gemspec
  • Root Gemfile entries removed (or consolidated)
  • bundle install succeeds with Ruby 3.4
  • Tests pass under Ruby 3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions