-
Notifications
You must be signed in to change notification settings - Fork 13
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
webrick dependency: crashes CI: Also contact author of rackup-2.2.0 to add webrick into its gemspec" #26
Comments
@fxn do you have any idea what is going on? |
The way the warning mechanism from ruby is works is ... unfortunate. zeitwerk and bootsnap hook into The actual issue will be one frame above, in your case likely from this piece of code, causing capybara to load webrick: https://github.com/sciencehistory/scihist_digicoll/blob/e42be55d641746267c22c7aa8359556608facab4/spec/rails_helper.rb#L41 Capybara should rescue the |
Aha, than you @Earlopain . I could have sworn I grepped my code for So there was still something weird going on -- I had a thousand+ line stack trace, that repeated those same lines over and over again, without getting to the line you pulled out. Something (about zeitwerk and/or websnap?) was causing an infinite loop here of some kind, making it hard to figure out what was going on. But that isn't rackup's problem, probably. At any rate, if I actually set |
Does Lines 84 to 93 in 8d32c96
|
Capybara defaults to
Yeah, if you want to stick with webrick for capybara, you'd have to add it to your gemfile yourself. I don't think I'm getting to far of when I say there is no way that rackup is responsible for the |
Hey! Zeitwerk decoration is super thin, basically if no loader manages the argument, it forwards the call. But you see it in the stack trace. These warnings are confusing. The first implementation assumed a certain call stack, but in Ruby you just cannot assume much, since things are open by design. That was later improved, but the root limitation cannot be avoided I guess. |
OK, I can't explain what I'm seeing in my app. With rackup 1.2.0, accidentally choosing here's a link to the apparently (infinitely?) looping stack trace, that appears in the middle of the rspec progress output (ie, not in test failure summary but printed to console in the midst or progress. You probably didn't need all 2100 lines of it since it looks like it just repeats, but just to make sure I'm not missing anything.... https://gist.github.com/jrochkind/8372c16b549020d59526cb2d4348256c |
@Earlopain can I assign this issue to you? |
Ah, right. I thought you meant one single backtrace but this seems to just be many smaller ones. Can't tell why it would do that but it is just an effect from the same cause.
I guess? But I don't think there is much to do here:
|
There's no infinite loop in the output. Each test is booting up Capybara which is trying to require "rack/handler/webrick", rescuing LoadError, then trying to require "rackup/handler/webrick", and failing to load webrick. Capybara will need to rescue LoadError again and give an informational message about adding webrick to Gemfile, like it does for Puma. So there's nothing to do here. Good visibility into the headaches that churn like this induces. |
Ah, i see. Thanks. I just switched back to I wonder if someone ought to report this Capybara? |
I will create a PR to capybara for a better error message tomorrow, if no one has beaten me to it yet by then. |
Thanks everyone! |
ruby 3.3.4, rails 7.2.1.1
After updating some dependencies incluidng rackup from 2.1.0 to 2.2.0.
While my app seems to work actually booting it, when I run CI I get all sorts of errors related to (apparently?) rackup and webrick.
Starts with what looks like a warning, but it winds up with apparently an infinite loop in the stack somehow (related to bootsnap and/or zeitwerk, is it really their bug?), and crashes everything.
I am not even intentionally using webbrick. The problem is that something (zeitwerk, automatically?) is trying to require rackup/handler/webbrick even though I'm not using it, which then tries to require
webrick
and crashes things.I see the webrick dependency was removed in 2.2.0, via #23 .
It may be this is causing unanticipated problems?
The text was updated successfully, but these errors were encountered: