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 authored and flavorjones committed Oct 26, 2020
1 parent 0785285 commit 5cefe58
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 @@ -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]
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 @@ -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
Expand All @@ -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"],
Expand Down

0 comments on commit 5cefe58

Please sign in to comment.