-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9k Constant Lookup Failure when Curly Brackets Used #4637
Comments
I reported this bug here: jruby/jruby#4637 By rephrasing these tests we don't trigger this JRuby issue.
Apparently my workaround with I'm stumped as to how to actually fix this |
Braces versus do/end should not make any difference, nor should environment. I suspect there's some dependency-loading issue here, like on one env things are loading in a different order and failing. Can you narrow down what's actually failing in the app? |
Bug reported here jruby/jruby#4637
@headius you're right, I just got lucky playing the roulette wheel when I changed the braces. It looks like it's something to do with If I add It looks like the requires should be happening here: https://github.com/rspec/rspec-expectations/blob/master/lib/rspec/matchers.rb#L8 which brings us to: While that code is a bit convoluted I don't see anything that seems unsafe there. BTW, I don't know if you noticed this @headius , but in the error it says:
So it seems like JRuby simultaneously knows the constant exists, and doesn't know it exists, since the recommendation is for the thing that is missing! Any ideas? |
I assume there's not a lot of concurrency in the specs, right? Do they run in some randomize order? |
Bug reported here jruby/jruby#4637
@headius they are randomized but not concurrent. Some of the specs may spawn additional threads, but the actual expectations are all in main. The confusing thing to me is that my reading of the This is all very confusing. |
Bug reported here jruby/jruby#4637 Fixes #72
I suspect this is related to concurrency issues in requires or autoloads (which should be fixed by #5764), or else concurrency issues in RSpec similar to rspec/rspec-dev#121. In any case this issue is rather stale and superseded by others so we'll close it as a dupe. |
When running https://github.com/logstash-plugins/logstash-input-http_poller on revision b141885e1eeb712e7149b54571639ee5bc58a5bd rspec fails when running
bundle exec rspec spec
with:All tests pass when run individually, but the suite consistently fails on both my laptop and on travis CI. The failures can be worked around by switching the syntax from
expect { ..code..}.to raise_error
to
expect do; ..code.. end.to raise_error
which I have done in logstash-plugins/logstash-input-http_poller#71
If I put in a
binding.pry
right after the exception is triggered the constant is found. This does not happen on JRuby 1.7.26.Environment info:
The text was updated successfully, but these errors were encountered: