zombocom / derailed_benchmarks

Go faster, off the Rails - Benchmarks for your whole Rails app
2.95k stars 142 forks source link

Can dead_end be removed? #201

Closed erikaxel closed 2 years ago

erikaxel commented 2 years ago

Hi,

I'm not sure why the dead_end gem is added as a dependency in this gem? Maybe it should be a development dependency instead? I'm sure dead_end is a great gem for those that need it, but it would be great to run benchmarks without adding additional dependencies.

schneems commented 2 years ago

I already recommend putting derailed in the development dependencies:

gem 'derailed_benchmarks', group: :development

We've got more than a few dependencies:

  gem.add_dependency "heapy",           "~> 0"
  gem.add_dependency "memory_profiler", ">= 0", "< 2"
  gem.add_dependency "get_process_mem", "~> 0"
  gem.add_dependency "benchmark-ips",   "~> 2"
  gem.add_dependency "rack",            ">= 1"
  gem.add_dependency "rake",            "> 10", "< 14"
  gem.add_dependency "thor",            ">= 0.19", "< 2"
  gem.add_dependency "ruby-statistics", ">= 2.1"
  gem.add_dependency "mini_histogram",  ">= 0.3.0"
  gem.add_dependency "dead_end",        ">= 0"
  gem.add_dependency "rack-test",       ">= 0"

Of those these likely aren't in your dependencies already:

  gem.add_dependency "heapy",           "~> 0"
  gem.add_dependency "memory_profiler", ">= 0", "< 2"
  gem.add_dependency "get_process_mem", "~> 0"
  gem.add_dependency "benchmark-ips",   "~> 2"
  gem.add_dependency "ruby-statistics", ">= 2.1"
  gem.add_dependency "mini_histogram",  ">= 0.3.0"
  gem.add_dependency "dead_end",        ">= 0"
  gem.add_dependency "rack-test",       ">= 0"

DeadEnd is tagged for going into Ruby 3.2 (2022) and at that time you'll not be able to get rid of it at all. DeadEnd shouldn't fire unless you're getting a syntax error. Are you hitting errors or problems with it? If so, we should iron those specific issues out.

schneems commented 2 years ago

If this is related to a version incompatibility, it was fixed in https://github.com/zombocom/dead_end/pull/90

schneems commented 2 years ago

Still happy to get your feedback, closing though as zombocom/dead_end#90 fixed that issue. Let me know if you hit any problems with that integration.