Open Jaco-Pretorius opened 11 months ago
This would only ever fire if you’ve got a syntax error or are trying to load a file that doesn’t exist.
if someone wants to remove dead-end or upgrade it to syntax_suggest I would accept the change.
(possibly) addresssed by https://github.com/zombocom/derailed_benchmarks/pull/228 which replaces dead_end
with syntax_suggest
which is the renamed library
https://github.com/ruby/syntax_suggest/blob/main/CHANGELOG.md#100-library-renamed-to-syntax_suggest-
Hi @Jaco-Pretorius as @schneems mentioned, this doesnt appear to be a dead_end/syntax_suggest issue and the main branch now has coverage for ruby 3.2 specifically. Since #230 already tracks the dead_end migration work I'll close this for now. Please reopen with repro steps against the latest derailed if you still believe there's a bug here. Thanks!
For the record, I am experiencing a similar issue with Ruby 3.1.3 and derailed_benchmark 2.2.1
/home/username/.rvm/gems/ruby-3.1.3@project/gems/derailed_benchmarks-2.2.1/lib/derailed_benchmarks.rb:7:in `require': cannot load such file -- syntax_suggest (LoadError)
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/derailed_benchmarks-2.2.1/lib/derailed_benchmarks.rb:7:in `<top (required)>'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:60:in `require'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:55:in `each'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:55:in `block in require'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:44:in `each'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:44:in `require'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler.rb:195:in `require'
from /home/username/Code/project/project/config/application.rb:8:in `<top (required)>'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:137:in `require'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:137:in `block in perform'
from <internal:kernel>:90:in `tap'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:134:in `perform'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/command/base.rb:87:in `perform'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/command.rb:48:in `invoke'
from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Can you provide a minimal repro please? Your output suggests that syntax_suggest is missing from bundle path but its not clear what command you’re running or how things are set up
For the record, I am experiencing a similar issue with Ruby 3.1.3 and derailed_benchmark 2.2.1
/home/username/.rvm/gems/ruby-3.1.3@project/gems/derailed_benchmarks-2.2.1/lib/derailed_benchmarks.rb:7:in `require': cannot load such file -- syntax_suggest (LoadError) from /home/username/.rvm/gems/ruby-3.1.3@project/gems/derailed_benchmarks-2.2.1/lib/derailed_benchmarks.rb:7:in `<top (required)>' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:60:in `require' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:60:in `block (2 levels) in require' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:55:in `each' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:55:in `block in require' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:44:in `each' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler/runtime.rb:44:in `require' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/bundler-2.4.7/lib/bundler.rb:195:in `require' from /home/username/Code/project/project/config/application.rb:8:in `<top (required)>' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:137:in `require' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:137:in `block in perform' from <internal:kernel>:90:in `tap' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands/server/server_command.rb:134:in `perform' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor/command.rb:28:in `run' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/command/base.rb:87:in `perform' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/command.rb:48:in `invoke' from /home/username/.rvm/gems/ruby-3.1.3@project/gems/railties-7.0.8.6/lib/rails/commands.rb:18:in `<top (required)>' from bin/rails:4:in `require' from bin/rails:4:in `<main>'
I just ran into the same error in 3.1.2. I'm guessing the syntax_suggest
gem is missing from the derailed gemspec? Simply adding the gem to my Gemfile fixed it:
group :development do
...
gem "syntax_suggest" # <-- added this
gem "derailed_benchmarks"
gem "stackprof"
...
end
I think an issue is the conditional in the gemspec. If you look at the dependencies on rubygems it doesn't list out syntax_suggest https://rubygems.org/gems/derailed_benchmarks/versions/2.2.1. It works with Ruby 3.2+ on CI because that gem exists
The intent of the conditional was to avoid declaring syntax_suggest
for ruby versions where it is already a default gem, but if there's no harm in declaring it unconditionally -- I'll just make that change? wdyt @schneems
Sounds good to me
Richard Schneeman https://howtoopensource.dev https://www.schneems.com he/him
On Sat, Nov 16, 2024 at 2:20 PM Peter Cai @.***> wrote:
The intent of the conditional was to avoid declaring syntax_suggest for ruby versions where it is already a default gem, but if there's no harm in declaring it unconditionally -- I'll just make that change? wdyt @schneems https://github.com/schneems
— Reply to this email directly, view it on GitHub https://github.com/zombocom/derailed_benchmarks/issues/233#issuecomment-2480785550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOSYAF2NEABWUUX7TE5NL2A6SHHAVCNFSM6AAAAABAX6VFM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBQG44DKNJVGA . You are receiving this because you were mentioned.Message ID: @.***>
I am having issues with running derailed against a Rails app with Ruby 3.2.2. The issue is rather obscure, but I'll put the stacktrace here
I suspect this is because the
dead_end
gem - which is thesyntax_suggest
repo - has been integrated with Ruby 3.2. At the very least it's not clear to me what is expected to happen if you include that gem while running Ruby 3.2 or later. There is an issue against thesyntax_suggest
repo which seems to indicate that you no longer need to include the gem but it doesn't say what will happen when you do. The stacktrace above does point to some of therequire_relative
overrides going on in that gem.