Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Aug 29, 2024

Earlopain added a commit to Earlopain/rubocop that referenced this pull request Aug 29, 2024
Ruby wants to bundle it: ruby/ruby#11492

This is pretty much all the gem does anyways: https://github.com/ruby/benchmark/blob/8d2c8a0d7ca72bff7e97a4800e16c72f232867e4/lib/benchmark.rb#L311-L315

I removed the `bench_cop` rake task since it uses `benchmark` and I believe it just isn't very useful.
Dedicated tools like `vernier` or `stackprof` (which has buildin support in RuboCop these days)
are much more suited for the task.
Earlopain added a commit to Earlopain/whitequark-parser that referenced this pull request Aug 29, 2024
Ruby wants to bundle it: ruby/ruby#11492

The benchmark gem does it like this for 14 years already so I don't imagine
problems with older ruby versions
Earlopain added a commit to Earlopain/whitequark-parser that referenced this pull request Aug 29, 2024
Ruby wants to bundle it: ruby/ruby#11492

The benchmark gem does it like this for 14 years already so I don't imagine
problems with older ruby versions
iliabylich pushed a commit to whitequark/parser that referenced this pull request Aug 29, 2024
Ruby wants to bundle it: ruby/ruby#11492

The benchmark gem does it like this for 14 years already so I don't imagine
problems with older ruby versions
Earlopain added a commit to Earlopain/benchmark-ips that referenced this pull request Aug 29, 2024
Ruby plans to bundle it: ruby/ruby#11492

That means, in the next ruby version requiring it without it appearing in the
gemspec will warn, and the release after that will error.
bbatsov pushed a commit to rubocop/rubocop that referenced this pull request Aug 29, 2024
Ruby wants to bundle it: ruby/ruby#11492

This is pretty much all the gem does anyways: https://github.com/ruby/benchmark/blob/8d2c8a0d7ca72bff7e97a4800e16c72f232867e4/lib/benchmark.rb#L311-L315

I removed the `bench_cop` rake task since it uses `benchmark` and I believe it just isn't very useful.
Dedicated tools like `vernier` or `stackprof` (which has buildin support in RuboCop these days)
are much more suited for the task.
Earlopain added a commit to Earlopain/rails that referenced this pull request Aug 29, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile, which in turn should depend
on `benchmark`: evanphx/benchmark-ips#141
@eregon
Copy link
Member

eregon commented Aug 29, 2024

https://bugs.ruby-lang.org/issues/20309 doesn't mention moving benchmark to bundled gems.
Was it discussed anywhere?

I think it's valuable that Benchmark.realtime { ... } is available without needing a gem dependency. It starts to feel a bit like JS/npm when one needs a dependency for something so simple (or copy/paste the code around, which can be suboptimal e.g. Benchmark.realtime could be implemented internally more efficiently or e.g. it changed from Time.now to Process.clock_gettime).

@hsbt
Copy link
Member Author

hsbt commented Aug 29, 2024

Do not rush to me. I will discuss this at next meeting.

@eregon
Copy link
Member

eregon commented Aug 29, 2024

I didn't mean to rush you, but yes I think it would be good to have some discussion about it on a Redmine ticket.
Updating the existing ticket without a comment doesn't notify watchers of the issue or the mailing list (unfortunately).

FWIW I found out about this PR from @Earlopain who started making PRs assuming benchmark will become a bundled gem. I think it's a bit too early for that, before the final decision has been taken to make it a bundled gem. (but doing that work is very much appreciated, thanks!)

hsbt added a commit to hsbt/ruby that referenced this pull request Sep 6, 2024
@hsbt
Copy link
Member Author

hsbt commented Sep 6, 2024

I merged this change to #11560

@hsbt hsbt closed this Sep 6, 2024
hsbt added a commit that referenced this pull request Sep 6, 2024
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 6, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 6, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 6, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 6, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 6, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Earlopain added a commit to Earlopain/rails that referenced this pull request Sep 11, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
DanielaVelasquez pushed a commit to DanielaVelasquez/rails that referenced this pull request Oct 3, 2024
Ruby plans to make `benchmark` a bundled gem: ruby/ruby#11492

It doesn't make much sense to continue this core extension since rails would
need to add it to its gemspec to continue offering it for what basically amounts to `x * 1000`.

Since requiring it could emit a warning, add it to the gemspec until it can later be removed
again with Rails 8.1

The benchmark generator will continue to work as usual:
It adds `benchmark-ips` to the users Gemfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants