From 5cefe5878779b9c9d190208c4224e96ea0bc442d 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 1/2] 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..8d83fdd166 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source "https://rubygems.org/" +gem "racc", "~>1.4" gem "mini_portile2", "~>2.5.0" gem "concourse", "~>0.38", :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 2323ee15cf..a3eb8212a2 100644 --- a/Rakefile +++ b/Rakefile @@ -41,6 +41,10 @@ HOE = Hoe.spec "nokogiri" do |hoe| ] hoe.clean_globs += Dir.glob("ports/*").reject { |d| d =~ %r{/archives$} } + hoe.extra_deps += [ + ["racc", "~> 1.4"], + ] + unless java? hoe.extra_deps += [ ["mini_portile2", "~> 2.5.0"], # keep version in sync with extconf.rb @@ -56,7 +60,6 @@ HOE = Hoe.spec "nokogiri" do |hoe| ["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"], From e0d25914cd75ea55a95bc8b745eaec6306e0a51b Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 26 Oct 2020 17:42:39 -0400 Subject: [PATCH 2/2] doc: update CHANGELOG to note explicit racc dependency --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac77fd9dc6..ef0ecf606e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ This release ends support for: #### Gems +* Explicitly add racc as a runtime dependency. [[#1988](https://github.com/sparklemotion/nokogiri/issues/1988)] (Thanks, [@voxik](https://github.com/voxik)!) * [MRI] Upgrade mini_portile2 dependency from `~> 2.4.0` to `~> 2.5.0` [[#2005](https://github.com/sparklemotion/nokogiri/issues/2005)] (Thanks, [@alejandroperea](https://github.com/alejandroperea)!)