Open zw963 opened 3 years ago
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.