Skip to content

Commit

Permalink
Add explicit Racc depenency.
Browse files Browse the repository at this point in the history
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 sparklemotion#1988
  • Loading branch information
voxik committed Oct 26, 2020
1 parent ad00764 commit 215688e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -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]
Expand All @@ -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]
Expand Down
5 changes: 4 additions & 1 deletion Rakefile
Expand Up @@ -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
Expand All @@ -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"],
Expand Down

0 comments on commit 215688e

Please sign in to comment.