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 from explicit dependencies #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fatkodima
Copy link
Contributor

activerecord already depends on activesupport.
Moreover, when trying to upgrade the gem without --conservative option, it tries to also upgrade activesupport dependencies, which is not needed.

@fatkodima fatkodima force-pushed the remove-activesupport-from-deps branch from 56ef6cf to 6434ac5 Compare August 19, 2024 13:04
@mvz
Copy link
Contributor

mvz commented Aug 31, 2024

The reason there's a direct dependency is that the code directly accesses the ActiveSupport namespace. That's mostly a question of esthetics, but activerecord does the same since it depends on both activemodel and activesupport, whereas activemodel also depends on activesupport.

Moreover, when trying to upgrade the gem without --conservative option, it tries to also upgrade activesupport dependencies, which is not needed.

I've been trying this out and I can see this happening (in my case, it updates minitest via activesupport), but removing the direct dependency on activesupport makes no difference. Do you have some demonstration that this change will actually have the effect you're looking for?

@fatkodima
Copy link
Contributor Author

Don't know how to locally demonstrate it without releasing a new version with this change. I was pretty sure this is the case.

@pas256
Copy link

pas256 commented Nov 20, 2024

Would this have any impact on enabling my project to upgrade to Rails 8?

Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Could not find compatible versions

Because rails >= 8.0.0 depends on activesupport = 8.0.0
  and acts_as_paranoid >= 0.10.2 depends on activesupport >= 6.1, < 8,
  rails >= 8.0.0 is incompatible with acts_as_paranoid >= 0.10.2.
So, because Gemfile depends on acts_as_paranoid ~> 0.10.2
  and Gemfile depends on rails ~> 8.0,
  version solving has failed.

@mvz
Copy link
Contributor

mvz commented Nov 20, 2024

@pas256 no, the activerecord dependency also won't allow Rails 8.

@rajneeshsharma9
Copy link

@mvz when are we planning to support rails 8? acts_as_paranoid is the only gem stopping me from upgrading to Rails 8

@mvz
Copy link
Contributor

mvz commented Nov 25, 2024

I'll probably make a release this weekend.

@mvz
Copy link
Contributor

mvz commented Nov 30, 2024

@rajneeshsharma9 Version 0.10.3 supporting Rails 8.0 has now been released.

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.

4 participants