gongo / turnip_formatter

A pretty formatter for Turnip
http://gongo.hatenablog.com/entry/2013/04/18/203426
MIT License
34 stars 24 forks source link

Support activesupport 6.x series #102

Closed TakeruUshio closed 5 years ago

TakeruUshio commented 5 years ago

activesupport 6.0 has String#{demodulize,underscore} as same as 4.2.7

Related PR: https://github.com/gongo/turnip_formatter/pull/99

so it seems no problem to update gem dependency.


Since Test fell, I modified the following.

Travis CI log

Bundler could not find compatible versions for gem "bundler":
  In Gemfile-rspec-3.7.x:
    bundler (~> 1.3)
  Current Bundler version:
    bundler (2.0.2)
TakeruUshio commented 5 years ago

@gongo

Hi. Do you remember meeting at Fukuoka Ruby Kaigi? I talked with @minimum2scp .

jruby version is old and test seems to be down, can I raise jruby version? If you can increase the version, what version should I use?

Error log ```shell $ rvm use jruby-9.0.5.0 --install --binary --fuzzy curl: (22) The requested URL returned error: 404 Not Found Required jruby-9.0.5.0 is not installed - installing. curl: (22) The requested URL returned error: 404 Not Found Searching for binary rubies, this might take some time. Found remote file https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.0.5.0/jruby-dist-9.0.5.0-bin.tar.gz Checking requirements for ubuntu. Requirements installation successful. jruby-9.0.5.0 - #configure jruby-9.0.5.0 - #download % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 38.9M 100 38.9M 0 0 99.3M 0 --:--:-- --:--:-- --:--:-- 99.2M No checksum for downloaded archive, recording checksum in user configuration. jruby-9.0.5.0 - #validate archive jruby-9.0.5.0 - #extract jruby-9.0.5.0 - #validate binary jruby-9.0.5.0 - #setup jruby-9.0.5.0 - #gemset created /home/travis/.rvm/gems/jruby-9.0.5.0@global unsupported Java version "11", defaulting to 1.7 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil to method sun.nio.ch.SelChImpl.getFD() WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release ** Updating RubyGems to the latest compatible version for security reasons. ** ** If you need an older version, you can downgrade with 'gem update --system OLD_VERSION'. ** unsupported Java version "11", defaulting to 1.7 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil to method sun.nio.ch.SelChImpl.getFD() WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release jruby-9.0.5.0 - #importing gemset /home/travis/.rvm/gemsets/jruby/global.gems...... Error running 'gemset_import_list jruby-openssl jruby-launcher gem-wrappers rubygems-bundler bundler rake rvm', please read /home/travis/.rvm/log/1569837224_jruby-9.0.5.0/gemsets.import.global.log jruby-9.0.5.0 - #generating global wrappers........ Error running 'run_gem_wrappers regenerate', please read /home/travis/.rvm/log/1569837224_jruby-9.0.5.0/gemset.wrappers.global.log WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens unsupported Java version "11", defaulting to 1.7 LoadError: library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to module jruby jruby-9.0.5.0 - #gemset created /home/travis/.rvm/gems/jruby-9.0.5.0 jruby-9.0.5.0 - #importing gemset /home/travis/.rvm/gemsets/default.gems. Error running 'gemset_import_list rake bundler', please read /home/travis/.rvm/log/1569837247_jruby-9.0.5.0/gemsets.import.default.log jruby-9.0.5.0 - #generating default wrappers.................. Error running 'run_gem_wrappers regenerate', please read /home/travis/.rvm/log/1569837247_jruby-9.0.5.0/gemset.wrappers.default.log Using /home/travis/.rvm/gems/jruby-9.0.5.0 WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens unsupported Java version "11", defaulting to 1.7 LoadError: library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to module jruby 1.48s$ gem install bundler -v '< 2' WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens WARNING: Unknown module: org.jruby.dist specified to --add-opens unsupported Java version "11", defaulting to 1.7 LoadError: library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to module jruby The command "gem install bundler -v '< 2'" failed and exited with 1 during . Your build has been stopped. ```

https://github.com/gongo/turnip_formatter/blob/master/.travis.yml#L14 jbury latest version: 9.2.8.0

gongo commented 5 years ago

Hi @TakeruUshio Thanks for PR !

jruby version is old and test seems to be down, can I raise jruby version?

🆗

TakeruUshio commented 5 years ago

@gongo

Hi. I investigated because jruby's test failed, but the same test seems to fail in the master branch.

Run the master branch test result ruby version ``` $ ruby -v jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 13+33 on 13+33 +jit [darwin-x86_64] ``` test result ``` $ bundle exec rake test WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release /Users/ta-ushio/.rbenv/versions/jruby-9.2.8.0/bin/jruby -I"lib:test" -I"/Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/lib" "/Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/lib/rake/rake_test_loader.rb" "test/turnip_formatter/renderer/html/test_data_table.rb" "test/turnip_formatter/renderer/html/test_doc_string.rb" "test/turnip_formatter/renderer/html/test_index.rb" "test/turnip_formatter/renderer/html/test_runtime_error.rb" "test/turnip_formatter/renderer/html/test_statistics_feature.rb" "test/turnip_formatter/renderer/html/test_statistics_speed.rb" "test/turnip_formatter/renderer/html/test_statistics_tag.rb" "test/turnip_formatter/renderer/html/test_step.rb" "test/turnip_formatter/renderer/test_html.rb" "test/turnip_formatter/resource/scenario/test_failure.rb" "test/turnip_formatter/resource/scenario/test_pass.rb" "test/turnip_formatter/resource/scenario/test_pending.rb" "test/turnip_formatter/step_template/test_base.rb" "test/turnip_formatter/step_template/test_exception.rb" "test/turnip_formatter/step_template/test_source.rb" WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release /Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert.rb:8: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag /Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert.rb:8: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag Loaded suite /Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/lib/rake/rake_test_loader Started ...............................F ================================================================================================================================================================================================================ org/jruby/RubyKernel.java:1188:in `catch' org/jruby/RubyKernel.java:1188:in `catch' 25: expect = [:passed, :failed, :unexecute] 26: actual = @resource.steps.map(&:status) 27: => 28: assert_equal(expect, actual) 29: end 30: 31: def test_steps_has_multiple_error /Users/ta-ushio/work_space/turnip_formatter/test/turnip_formatter/resource/scenario/test_failure.rb:28:in `test_steps' <[:passed, :failed, :unexecute]> expected but was <[:passed, :passed, :passed]> diff: ? [:passed, :failed, :un execute] ? p ss pass d Failure: test_steps(TurnipFormatter::Resource::Scenario::TestFailure) ================================================================================================================================================================================================================ ..F ================================================================================================================================================================================================================ org/jruby/RubyKernel.java:1188:in `catch' org/jruby/RubyKernel.java:1188:in `catch' 87: expect = [:passed, :failed, :unexecute, :failed] 88: actual = @resource.steps.map(&:status) 89: => 90: assert_equal(expect, actual) 91: assert_equal(TurnipFormatter::Resource::Step::AfterHook, @resource.steps.last.class) 92: end 93: /Users/ta-ushio/work_space/turnip_formatter/test/turnip_formatter/resource/scenario/test_failure.rb:90:in `test_steps_has_error_in_steps_and_after_hook' <[:passed, :failed, :unexecute, :failed]> expected but was <[:passed, :passed, :passed, :failed]> diff: ? [:passed, :failed, :un execute, :failed] ? p ss pass d Failure: test_steps_has_error_in_steps_and_after_hook(TurnipFormatter::Resource::Scenario::TestFailure) ================================================================================================================================================================================================================ F ================================================================================================================================================================================================================ org/jruby/RubyKernel.java:1188:in `catch' org/jruby/RubyKernel.java:1188:in `catch' 42: expect = [:passed, :failed, :passed, :failed, :passed] 43: actual = @resource.steps.map(&:status) 44: => 45: assert_equal(expect, actual) 46: end 47: 48: def test_steps_has_error_in_before_hook /Users/ta-ushio/work_space/turnip_formatter/test/turnip_formatter/resource/scenario/test_failure.rb:45:in `test_steps_has_multiple_error' <[:passed, :failed, :passed, :failed, :passed]> expected but was <[:passed, :passed, :passed, :passed, :passed]> diff: ? [:passed, :failed, :passed, :failed, :passed] ? p ss :passed, Failure: test_steps_has_multiple_error(TurnipFormatter::Resource::Scenario::TestFailure) ================================================================================================================================================================================================================ ............F ================================================================================================================================================================================================================ org/jruby/RubyKernel.java:1188:in `catch' org/jruby/RubyKernel.java:1188:in `catch' 21: 22: def test_build_failed 23: actual = @template.build_failed(dummy_failed_step) => 24: assert_match(%r{
}, actual) 25: end 26: 27: def test_build_pending /Users/ta-ushio/work_space/turnip_formatter/test/turnip_formatter/step_template/test_exception.rb:24:in `test_build_failed' Failure: test_build_failed(TurnipFormatter::StepTemplate::TestException): /> was expected to be =~ <"\n">. ================================================================================================================================================================================================================ .F ================================================================================================================================================================================================================ org/jruby/RubyKernel.java:1188:in `catch' org/jruby/RubyKernel.java:1188:in `catch' 21: 22: def test_build_failed 23: actual = @template.build_failed(dummy_failed_step) => 24: assert_match(%r{
}, actual) 25: end 26: end 27: end /Users/ta-ushio/work_space/turnip_formatter/test/turnip_formatter/step_template/test_source.rb:24:in `test_build_failed' Failure: test_build_failed(TurnipFormatter::StepTemplate::TestSource): /> was expected to be =~ <"\n">. ================================================================================================================================================================================================================ Finished in 2.137213 seconds. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 51 tests, 69 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 90.1961% passed ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 23.86 tests/s, 32.29 assertions/s rake aborted! Command failed with status (1): [ruby -I"lib:test" -I"/Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/lib" "/Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/lib/rake/rake_test_loader.rb" "test/turnip_formatter/renderer/html/test_data_table.rb" "test/turnip_formatter/renderer/html/test_doc_string.rb" "test/turnip_formatter/renderer/html/test_index.rb" "test/turnip_formatter/renderer/html/test_runtime_error.rb" "test/turnip_formatter/renderer/html/test_statistics_feature.rb" "test/turnip_formatter/renderer/html/test_statistics_speed.rb" "test/turnip_formatter/renderer/html/test_statistics_tag.rb" "test/turnip_formatter/renderer/html/test_step.rb" "test/turnip_formatter/renderer/test_html.rb" "test/turnip_formatter/resource/scenario/test_failure.rb" "test/turnip_formatter/resource/scenario/test_pass.rb" "test/turnip_formatter/resource/scenario/test_pending.rb" "test/turnip_formatter/step_template/test_base.rb" "test/turnip_formatter/step_template/test_exception.rb" "test/turnip_formatter/step_template/test_source.rb" ] /Users/ta-ushio/work_space/turnip_formatter/vender/bundle/jruby/2.5.0/gems/rake-13.0.0/exe/rake:27:in `
' /Users/ta-ushio/.rbenv/versions/jruby-9.2.8.0/bin/bundle:23:in `
' Tasks: TOP => test (See full trace by running task with --trace) ```

And then, when examining the test of Turnip itself, the jruby test failed there.

Turnip CI result

When I checked Turnip's travis.yml , jruby's test was excluded from the test result with allow_failures.

So how about turnip_formatter test with allow_failures for jruby?

gongo commented 5 years ago

So how about turnip_formatter test with allow_failures for jruby?

ok!

gongo commented 5 years ago

@TakeruUshio Thanks!!

TakeruUshio commented 5 years ago

Thank you for the release 0.7.2 .