From 9cb78891aac4dac89fc048442eb814468d6bb065 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Mon, 26 Oct 2026 10:46:33 +0900 Subject: [PATCH] gem: remove yajl-ruby from runtime dependencies The Ruby version guard in the gemspec is evaluated only at gem build time, so the published gem always depends on yajl-ruby. yajl-ruby cannot be built on Ruby 4.1, so installing fluentd fails there. Fluentd itself no longer uses yajl-ruby. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Shizuo Fujita --- fluentd.gemspec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fluentd.gemspec b/fluentd.gemspec index 74a09c207d..0aa1ab1533 100644 --- a/fluentd.gemspec +++ b/fluentd.gemspec @@ -43,15 +43,6 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency("async-http", "~> 0.86") gem.add_runtime_dependency("json", '>= 2.21') - if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("4.1") - # Fluentd itself no longer uses yajl-ruby, replaced with JSON::ResumableParser. - # This dependency is kept temporarily because some third-party plugins `require 'yajl'` without declaring - # it in their own gemspec, relying on Fluentd to pull it in. - # The version guard exists because yajl-ruby fails to build on Ruby >= 4.1. - # We can remove this dependency when retired to support Ruby 4.0 or below. - gem.add_runtime_dependency("yajl-ruby", ["~> 1.0"]) - end - # gems that aren't default gems as of Ruby 3.4 gem.add_runtime_dependency("base64", ["~> 0.2"]) gem.add_runtime_dependency("csv", ["~> 3.2"])