-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Remove ActiveSupport dependency #16190
Comments
Agreed, this makes sense to me. It might make sense to have a list of the stuff we're (still) using so we can discuss each one and whether it makes sense to:
@dduugg if you have the bandwidth and desire: would you be able to create such a list? 🙇🏻 |
@MikeMcQuaid yep, i can own this own this ticket, if you're ok with a slow rollout as bandwidth allows me (probably circa end-of-year) |
@dduugg Works for me, thanks! |
For any deprecations, it would be good to get those by mid-December (minor bump will ideally be before the holidays, but no earlier than the 11th). Not a blocker though, as we can instead punt the deprecations until April (minor bump for Ruby 3.2 maybe?). Assuming it's still around by then, I'm also considering moving what is left of ActiveSupport to the mechanize-style gem vendoring instead of bundler vendoring it for Ruby 3.1. To do this however, we first need to remove our dependency on |
I'd really rather keep everything in Bundler we can as it makes version management way easier.
Yup 👍🏻 I'd think we can probably reimplement most other stuff by that timescale 🤞🏻 |
Happy to take care of this separately from the refactoring of the rest of the ActiveSupport code. PR incoming. |
4.2.0 changes are landing now. Let me know if there's anything here that should land with 4.2.0 and needs help with. |
One question is what we do with rubocop-rails, given that has a ActiveSupport dependency on its own. Going through what we have enabled:
|
Feels like by the time we end up vendoring ActiveSupport changes we should probably do the same with the specific cops that make sense. Has always been a bit of a cludge in here. Agreed with your takes about what's useful/not. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I poked around for where we're still relying on ActiveSupport and came up with the table below. Since we mostly require these from
I think this is useful for folks to identify which methods we want to vendor, and which we want to refactor away, but let me know if y'all were wanting other metrics in order to guide us from here. |
I've found these arbitrary a bit but do get why they are sometimes used. I'd like to see alternatives to it. For example instead of This is however used in homebrew-core and at least one third-party tap so should be considered public API and go through any relevant deprecation process. In terms of the rest:
|
Thanks @dduugg!
I think anything with a trivial one-line implementation and/or >=3 uses by us or any third-party tap usage should be vendored. Also agreed with @Bo98's assessment of what should be considered public API/not. |
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.Provide a detailed description of the proposed feature
Remove the
activesupport
gem dependency. For simple components with downstream dependencies, we can directly incorporate the monkey-patches. Other components should just be replaced with Ruby methods (much of the good stuff in ActiveSupport has been incorporated into recent Ruby releases anyway).What is the motivation for the feature?
ActiveSupport
has been a source of performance issues (as it's arguably intended for server lifecycles, not CLI tools). It lacks some type optimizations that sorbet knows about with core methods. Monkey-patches can make for subtle bugs, as libraries and Ruby core may disagree over which versions they consider canonical.How will the feature be relevant to at least 90% of Homebrew users?
Maybe some tiny perf improvements (though possibly a less user-friendly interface at the edges as well).
What alternatives to the feature have been considered?
We could maintain the status quo, and be vigilant about keeping out the less performant components (e.g. inflections)
The text was updated successfully, but these errors were encountered: