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

RFC: Support Rails 6 #3053

Closed
jarednorman opened this issue Jan 25, 2019 · 19 comments
Closed

RFC: Support Rails 6 #3053

jarednorman opened this issue Jan 25, 2019 · 19 comments

Comments

@jarednorman
Copy link
Member

The first Rails 6 beta is out, so we can start discussing how we're going to support that. When the project moved from Rails 4.x to Rails 5, we cut a major version that introduced no new features and only upgraded the codebase for compatibility. Depending on the extent of the changes in Rails 6, something that big might not be necessary.

I'm opening this issue to gather comments/discussion on Rails 6 support for Solidus.

@jarednorman jarednorman changed the title Support Rails 6 RFC: Support Rails 6 Jan 25, 2019
@mdesantis
Copy link
Contributor

mdesantis commented Jan 28, 2019

One thought about Rails 6 and ActionText: are there any places in Solidus where we'd like to use it? Any places where we write rich text?

@kennyadsl
Copy link
Member

@mdesantis solidus_editor is what is used for this kind of things most of the times, I think.

@ericsaupe
Copy link
Contributor

This one too solidus_static_content. I fired up a new Rails 6 app with ActionText and it worked pretty well. Definitely could make those extensions cleaner. It works with ActiveStorage so it might be something that benefits from #2974

@jarednorman
Copy link
Member Author

I've been live streaming myself working on this. Here's the YouTube playlist of past streams.

The biggest issue I've run into so far is that there are some really annoying incompatibilities with newer versions of CanCanCan. I've been running against the branch that has Rails 6 support, and it's caused a whole bunch of unrelated issues.

I'll continue working away on that. I haven't opened a progress PR because I'm waiting on releases on a bunch of the gems that will need to be bumped to support Rails 6. Currently I'm just pointing at various GitHub branches that contain the tentative work on Rails 6 support for those gems.

I've got core passing, and backend/frontend almost completely passing if I comment out the stuff in the permission sets that are causing the CanCanCan headaches. API is full of failing specs and I haven't dug into that, but I imagine it's at least partially related to the authorization issues.

@coorasse
Copy link
Contributor

The pull request #3148 tackles the issues with cancancan 3.0 by reorganising abilities in a proper way.
The pull request #3174 overrides the merge method of cancancan 3.0 to keep the old behaviour and be able to proceed with the upgrade to Rails 6.0

@aldesantis
Copy link
Member

I am working on this in #3236. The work is basically done on the Solidus side, but there are a few dependencies that are not yet ready for Rails 6, so we're waiting on those!

@ericsaupe
Copy link
Contributor

Rails 6 has now officially been released

https://weblog.rubyonrails.org/2019/8/15/Rails-6-0-final-release/

https://rubygems.org/gems/rails/versions/6.0.0

@aldesantis
Copy link
Member

#3236 is ready to merge.

Tasks that are not blocking and will be done in separate PRs:

  • Replace update_attributes with update
  • Adopt RSpec 4.x stable when it comes out

@cedum
Copy link
Contributor

cedum commented Sep 3, 2019

Just discovered that Rails 6' sqlite3 adapter got bumped to v1.4.
This causes the same kind of conflicts described and fixed here PR #3088 (Lock sqlite3 version to 1.3) for Rails 5.2.
Actually, on Solidus, sqlite3 is fixed to ~> v1.3.6 and on Rails6 to ~> v1.4 (not ~> v1.4.0)
Any ideas? 💡

@tvdeyen
Copy link
Member

tvdeyen commented Sep 3, 2019

This only effects the sandbox, correct?

@kennyadsl
Copy link
Member

It also effects running bundle install in development with sqlite and rails 6. I'm taking a look and have a PR almost ready for that.

@tvdeyen
Copy link
Member

tvdeyen commented Sep 3, 2019

Awesome. Thanks. Shouldn’t the solution be as easy as removing the version constraint? So, that Bundler resolves the correct version for us dependent on which Rails Version we use?

@kennyadsl
Copy link
Member

I expected an issue actually, since Rails does not have any direct sqlite dependency it will always use the latest one. In fact, running

RAILS_VERSION='~> 5.2.0' bundle install

generates a Gemfile.lock with Rails 5.2.3 and sqlite3 1.4.1, which should not allow completing the bundle. Maybe I'm missing something or latest 5.2.x Rails versions are now compabile with sqlite 1.4.1. Still investigating...

@cedum
Copy link
Contributor

cedum commented Sep 3, 2019

@kennyadsl the sqlite3 version got "relaxed" since rails v5.2.3:
https://github.com/rails/rails/blob/v5.2.3/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
v5.2.2 instead contains the stricter one:
https://github.com/rails/rails/blob/v5.2.2/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb

(edit: wrong link)

@kennyadsl
Copy link
Member

@cedum that explains what's happening, thanks!

@aldesantis
Copy link
Member

@kennyadsl can we close this?

@kennyadsl
Copy link
Member

I think we "just" need to update all extensions to work with Zeitwerk to have a fully working Rails 6 support, but yes, we should probably close this one and create a new issue? What do you think?

@aldesantis
Copy link
Member

@kennyadsl we should be good to go since spree/deface#202 was merged.

@spaghetticode
Copy link
Member

Closing, since Solidus is compatible with Rails 6 since version 2.10.

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

No branches or pull requests

10 participants