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

Make solidus_core depend on actionmailer and activerecord instead of rails #2272

Merged
merged 1 commit into from
Oct 11, 2017
Merged

Make solidus_core depend on actionmailer and activerecord instead of rails #2272

merged 1 commit into from
Oct 11, 2017

Conversation

BenMorganIO
Copy link
Contributor

@BenMorganIO BenMorganIO commented Oct 5, 2017

We originally closed #2239 because we thought we were going to get it in from #2236 but never did. So... Here's a new PR!


Before:

$ bundle
Bundle complete! 30 Gemfile dependencies, 126 gems now installed.

After:

$ bundle
Bundle complete! 30 Gemfile dependencies, 123 gems now installed.

@jhawthorn jhawthorn changed the title remove rails and use only actionmailer and activerecord Make solidus_core depend on actionmailer and activerecord instead of rails Oct 5, 2017
Copy link
Contributor

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

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

Seems good to me 👍

Copy link
Contributor

@cbrunsdon cbrunsdon left a comment

Choose a reason for hiding this comment

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

Rails is still being used and called directly in many places in core, (for instance:

@cache = Rails.cache
).

Just removing the gems doesn't remove our dependence on it, we're just counting on other places to include it for us, which isn't a good practice IMO.

@BenMorganIO
Copy link
Contributor Author

BenMorganIO commented Oct 5, 2017

@cbrunsdon nope... Wait, isn't that from railties?

Rails only includes the README.md.

https://github.com/rails/rails/blob/master/rails.gemspec#L21

And for the Rails.cache method:

https://github.com/rails/rails/blob/master/railties/lib/rails.rb#L38

@cbrunsdon
Copy link
Contributor

At the very least I think we'll need to add activesupport, activejob, and railties, which are the three I know we depend on inside of core.

@cbrunsdon
Copy link
Contributor

@BenMorganIO aye, Rails is from railties, but we don't have that dependency, we get it through other gems that do explicitely have it listed, which I don't think is good to rely on.

@jhawthorn
Copy link
Contributor

At the very least I think we'll need to add activesupport, activejob, and railties, which are the three I know we depend on inside of core.

We do get these from other gems, but it would make sense to add them to our deps

%w[activerecord actionmailer].each do |rails_dep|
%w[
actionmailer actionpack actionview activejob activemodel activerecord
activesupport
Copy link
Contributor

Choose a reason for hiding this comment

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

railties too please

@cbrunsdon cbrunsdon dismissed their stale review October 10, 2017 18:00

Feedback addressed

Copy link
Contributor

@cbrunsdon cbrunsdon left a comment

Choose a reason for hiding this comment

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

I think that is a comprehensive list now of everything we need 👍

@gmacdougall gmacdougall merged commit 076ecc4 into solidusio:master Oct 11, 2017
@BenMorganIO BenMorganIO deleted the remove-rails-gem branch October 11, 2017 18:57
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.

None yet

4 participants