Skip to content
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 by creating package_manager_version #6667

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

jakecoffman
Copy link
Member

@jakecoffman jakecoffman commented Feb 14, 2023

Sparked by my troubles in #6658 to get the Updater test working, and remembering that updating activesupport to the latest version broke things in #6522, I asked why we need it at all?

It seems more straight forward to elevate a method (package_manager_version) to be implemented in the base, and have file_fetchers implement it than to use Notifications. That and we get to delete a dependency that is giving us trouble!

@jakecoffman
Copy link
Member Author

Looks like this is mostly working now, just some Active Support extensions we could either monkey-patch back in or rewrite with plain-ole-Ruby. The dry-run HTTP request output is nice so we'll definitely want to add that back in somehow.

I will pause now for any input. Is this a good idea?

@deivid-rodriguez
Copy link
Contributor

ActiveSupport is helpful is you use a significant part of the functionality it provides. In our case, we seem to be using just minimal functionality but we get the disadvantages of globally monkeypatching a lot of core classes. If we can do this, I'm all for it.

@jakecoffman
Copy link
Member Author

jakecoffman commented Feb 15, 2023

I think I got everything. I opted to replace ActiveSupport extensions instead of monkey patching them back in. Also made the executive decision to delete bin_run_spec.rb since we have a suite of tests that use bin/run with more thorough assertions.

@jakecoffman jakecoffman marked this pull request as ready for review February 15, 2023 19:45
@jakecoffman jakecoffman requested a review from a team as a code owner February 15, 2023 19:45
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, awesome job!

I guess this could be logically divided into two commits, one to remove the end to end fetcher specs, the other one to remove the activesupport dependency? Happy to rebase and squash this to do that, just to get git history a bit cleaner.

bin/dry-run.rb Show resolved Hide resolved
@jakecoffman jakecoffman force-pushed the jakecoffman/remove-active-support branch from 058a357 to 63f1249 Compare February 15, 2023 21:00
@jakecoffman
Copy link
Member Author

@deivid-rodriguez rebased

Copy link
Contributor

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really happy about this, thanks for the nice work!

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