Skip to content

Rake 13.4.2 TestTask fails when combining :direct loader and verbose = true #724

Description

@chadlwilson

The :direct loader requires every arg directly

"-e \"ARGV.each{|f| require f}\""

Thus verbose is now an arg since #723 so as a consequence you get errors like

LoadError: no such file to load -- -v
  require at org/jruby/RubyKernel.java:1187
  require at /home/runner/.rubies/jruby-9.4.12.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:144
   <main> at -e:1
     each at org/jruby/RubyArray.java:2009
   <main> at -e:1
rake aborted!
Command failed with status (1): [ruby -w -I"lib:/home/runner/work/jruby-openssl/jruby-openssl/src/test/ruby" -C src/test/ruby -rbundler/setup -e "ARGV.each{|f| require f}" "dsa/test_dsa.rb" "ec/test_ec.rb" "oaep/test_oaep.rb" "pkcs5/test_pbkdf2.rb" "pkcs7/test_attribute.rb" "pkcs7/test_bio.rb" "pkcs7/test_mime.rb" "pkcs7/test_pkcs7.rb" "pkcs7/test_smime.rb" "rsa/test_rsa.rb" "ssl/test_context.rb" "ssl/test_helper.rb" "ssl/test_ocsp.rb" "ssl/test_session.rb" "ssl/test_socket.rb" "ssl/test_ssl.rb" "test_asn1.rb" "test_bn.rb" "test_cipher.rb" "test_digest.rb" "test_helper.rb" "test_hmac.rb" "test_kdf.rb" "test_openssl.rb" "test_pkey.rb" "test_random.rb" "test_security.rb" "test_security_helper.rb" "x509/test_x509cert.rb" "x509/test_x509crl.rb" "x509/test_x509ext.rb" "x509/test_x509name.rb" "x509/test_x509req.rb" "x509/test_x509revoked.rb" "x509/test_x509store.rb" -v]

I suppose it would have failed before if using the option_list also so perhaps this isn't really supported, and can be closed. Maintainer call :-)

Workaround is something hacky like

Rake::TestTask.new do |task|
  task.verbose = true
  task.loader = "ARGV.each { |f| require f unless f.start_with?('-') }"
  # task.loader = :direct
  # ....other stuff
end
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