You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following is output messages when i run rake to run my test, but the test is passing.
home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/cliver-0.3.2/lib/core_ext/file.rb:15: warning: method redefined; discarding old absolute_path?
/home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34: warning: /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34: warning: loading in progress, circular require considered harmful - /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets.rb
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `<main>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `select'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in `block in <main>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in `require'
from /home/zw963/Stocks/marketbet_crawler/test/services/latest_institutions_test.rb:1:in `<top (required)>'
from /home/zw963/Stocks/marketbet_crawler/test/services/latest_institutions_test.rb:1:in `require'
from /home/zw963/Stocks/marketbet_crawler/test/test_helper.rb:13:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
from config.ru:1:in `block in <main>'
from config.ru:1:in `require_relative'
from /home/zw963/Stocks/marketbet_crawler/config/environment.rb:3:in `<top (required)>'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler.rb:174:in `require'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/runtime.rb:50:in `require'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/runtime.rb:50:in `each'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/runtime.rb:61:in `block in require'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/runtime.rb:61:in `each'
from /home/zw963/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/runtime.rb:66:in `block (2 levels) in require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal-sprockets.rb:1:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets.rb:4:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets.rb:5:in `<module:Opal>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets.rb:11:in `<module:Sprockets>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets/environment.rb:2:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/opal-sprockets-1.0.1/lib/opal/sprockets/processor.rb:6:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
from /home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
/home/zw963/Stocks/marketbet_crawler/config/application.rb:9: warning: method redefined; discarding old call
/home/zw963/.rvm/gems/ruby-3.0.2@marketbet_crawler/gems/rack-2.2.3/lib/rack/lint.rb:37: warning: previous definition of call was here
This was reported in the Zeitwerk issue tracker too, so I looked into it.
You see "zeitwerk" in the logs because all require calls pass through this thin wrapper if the library is loaded.
It is a regular circular require warning (this project does not use Zeitwerk). I see for example that lib/opal/sprockets.rb loads lib/opal/sprockets/processor.rb (here), and while that is happening, lib/opal/sprockets/processor.rb tries to load lib/opal/sprockets.rb (here).
One way to address that would be to forbid client code from loading the processor directly, you have to load opal/sprockets no matter what (that way, the processor can assume the namespace is defined). If that is not possible... well, you need to figure that out.
Following is output messages when i run
rake
to run my test, but the test is passing.You can check my source code here
https://github.com/zw963/marketbet_crawler/tree/test_opal_sprockets
for run test, you must set following ENVS:
Thank you.
The text was updated successfully, but these errors were encountered: