Skip to content

Commit

Permalink
dev: avoid running racc or rex under jruby
Browse files Browse the repository at this point in the history
not sure why `rake generate` is trying to do so in CI, but I'm
assuming it has to do with non-deterministic file timestamps and so am
punting and simply skipping it under jruby with a warning.
  • Loading branch information
flavorjones committed Dec 1, 2018
1 parent 543968d commit 5ed7aff
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,21 @@ task 'bundler:gemfile' do
end

file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t|
sh "racc -l -o #{t.name} #{t.prerequisites.first}"
if java?
warn "WARNING: #{GENERATED_PARSER} may be out of date:"
sh "ls -lt #{t.name} #{t.prerequisites.first}"
else
sh "racc -l -o #{t.name} #{t.prerequisites.first}"
end
end

file GENERATED_TOKENIZER => "lib/nokogiri/css/tokenizer.rex" do |t|
sh "rex --independent -o #{t.name} #{t.prerequisites.first}"
if java?
warn "WARNING: #{GENERATED_TOKENIZER} may be out of date:"
sh "ls -lt #{t.name} #{t.prerequisites.first}"
else
sh "rex --independent -o #{t.name} #{t.prerequisites.first}"
end
end

[:compile, :check_manifest].each do |task_name|
Expand Down

0 comments on commit 5ed7aff

Please sign in to comment.