Skip to content

JRuby test builds do not generate grammar_file_scanner.rb #96

Closed as not planned

Description

@headius

There seems to be some file dependency issue with lib/racc/grammar_file_scanner.rb. It gets generated automatically based on dependencies when running rake test on CRuby, but it does not get generated on JRuby.

This causes the test suite to fail to start:

/home/travis/.rvm/rubies/jruby-9.2.4.0/bin/jruby -w -I.:lib/racc:lib:bin:test:. -e 'require "rubygems"; require "minitest/autorun"; require "test/test_chk_y.rb"; require "test/test_directed_graph.rb"; require "test/test_grammar_file_parser.rb"; require "test/test_racc_command.rb"; require "test/test_scan_y.rb"; require "test/test_scanner.rb"' -- 
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
LoadError: no such file to load -- racc/grammar_file_scanner
  require at org/jruby/RubyKernel.java:976
   <main> at /home/travis/build/tenderlove/racc/lib/racc/grammar_file_parser.rb:10
  require at org/jruby/RubyKernel.java:976
   <main> at /home/travis/build/tenderlove/racc/test/helper.rb:1
  require at org/jruby/RubyKernel.java:976
   <main> at /home/travis/build/tenderlove/racc/test/helper.rb:7
  require at org/jruby/RubyKernel.java:976
   <main> at -e:1

I do not have an explanation for this, but I suspect some combination of rake-compiler and the various JRuby-specific conditionals in the Rakefile are interfering somehow. Note that the file does get generated when packaging the full gem, but it is not generated for rake test. For whatever reason, the test target does not end up depending on this file in the same way it is on CRuby.

I am patching it temporarily for #93 by forcibly generating it in the test script.

Activity

  1. zenspider commented on Aug 17, 2020

    @zenspider
    Member

    Is this still a thing?

  2. hsbt commented on Jan 11, 2023

    @hsbt
    Member

    @headius I'll close this. If you still have any issue, Please ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions