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.
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?
@mdesantis solidus_editor is what is used for this kind of things most of the times, I think.
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
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.
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
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!
Rails 6 has now officially been released
https://weblog.rubyonrails.org/2019/8/15/Rails-6-0-final-release/
https://github.com/solidusio/solidus/pull/3236 is ready to merge.
Tasks that are not blocking and will be done in separate PRs:
update_attributes with updateJust 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? 馃挕
This only effects the sandbox, correct?
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.
Awesome. Thanks. Shouldn鈥檛 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?
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...
@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)
@cedum that explains what's happening, thanks!
@kennyadsl can we close this?
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?
@kennyadsl we should be good to go since https://github.com/spree/deface/pull/202 was merged.
Closing, since Solidus is compatible with Rails 6 since version 2.10.
Most helpful comment
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.