From 215688e73cfb7ef05220c5486b5af4df7ee072ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 26 Oct 2020 19:19:23 +0100 Subject: [PATCH] Add explicit Racc depenency. Nokogiri always have had dependency on Racc, but it was never stated explicitly. This is possible issue for several reasons: 1) There is no way RubyGems/Bundler could avoid loading wrong version of Racc if other package in application specifies different version of Racc then Nokogiri needs. 2) If there is released incompatible Racc 2.x, all old versions of Nokogiri will be broken just because it does not specify its dependencies properly. 3) If Ruby decides to drop Racc from StdLib, all Nokogiri versions will be broken (unnoticeably). Or Ruby will be forced to carry Racc around around although it is possibly obsolete. Fixes #1988 --- Gemfile | 2 +- Rakefile | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 42017be849..15bf64b0ad 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ source "https://rubygems.org/" gem "mini_portile2", "~>2.5.0" +gem "racc", "~>1.4" gem "concourse", "~>0.38", :group => [:development, :test] gem "hoe", "~>3.22", ">=3.22.1", :group => [:development, :test] @@ -14,7 +15,6 @@ gem "hoe-gemspec", "~>1.0", :group => [:development, :test] gem "hoe-git", "~>1.6", :group => [:development, :test] gem "hoe-markdown", "~>1.1", :group => [:development, :test] gem "minitest", "~>5.8", :group => [:development, :test] -gem "racc", "~>1.5.0", :group => [:development, :test] gem "rake", "~>13.0", :group => [:development, :test] gem "rake-compiler", "~>1.1", :group => [:development, :test] gem "rake-compiler-dock", "~>1.0", :group => [:development, :test] diff --git a/Rakefile b/Rakefile index 577c684900..1b6abbb70d 100644 --- a/Rakefile +++ b/Rakefile @@ -40,6 +40,10 @@ HOE = Hoe.spec 'nokogiri' do ] self.clean_globs += Dir.glob("ports/*").reject { |d| d =~ %r{/archives$} } + self.extra_deps += [ + ["racc", "~> 1.4"], + ] + unless java? self.extra_deps += [ ["mini_portile2", "~> 2.5.0"], # keep version in sync with extconf.rb @@ -55,7 +59,6 @@ HOE = Hoe.spec 'nokogiri' do ["hoe-git", "~> 1.6"], ["hoe-markdown", "~> 1.1"], ["minitest", "~> 5.8"], - ["racc", "~> 1.5.0"], ["rake", "~> 13.0"], ["rake-compiler", "~> 1.1"], ["rake-compiler-dock", "~> 1.0"],