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

Update to ActiveRecord 4.2 #26

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Update to ActiveRecord 4.2 #26

wants to merge 4 commits into from

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 30, 2022

Baby steps, trying to update to the most recent ActiveRecord 4 series here, which is currently 4.2.11.3. Right now, it breaks with <module:Visitors>': superclass mismatch for class ToSql (TypeError). Can you help here, @hammerhead?

/home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/arel/visitors/crate.rb:35:in `<module:Visitors>': superclass mismatch for class ToSql (TypeError)
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/arel/visitors/crate.rb:23:in `<module:Arel>'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/arel/visitors/crate.rb:22:in `<top (required)>'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/arel/arel_crate.rb:23:in `<top (required)>'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/active_record/connection_adapters/crate_adapter.rb:25:in `<top (required)>'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/activerecord-crate-adapter.rb:22:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/lib/activerecord-crate-adapter.rb:22:in `<top (required)>'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/spec/spec_helper.rb:24:in `require'
	from /home/runner/work/activerecord-crate-adapter/activerecord-crate-adapter/spec/spec_helper.rb:24:in `<top (required)>'

@amotl amotl changed the title Dependencies: Update to activerecord-4, which is currently 4.2.11.3 Update to ActiveRecord 4.2 Nov 30, 2022
@amotl
Copy link
Member Author

amotl commented Feb 12, 2024

Hi @hammerhead. You added two commits here, but I accidentally destroyed them, apologies. Can you have a look at your local repository, if you still have it, and just git push --force on this branch once again? Thank you!

@hammerhead
Copy link
Member

Hi @hammerhead. You added two commits here, but I accidentally destroyed them, apologies. Can you have a look at your local repository, if you still have it, and just git push --force on this branch once again? Thank you!

No problem, I just force-pushed.

@amotl
Copy link
Member Author

amotl commented Feb 13, 2024

Now, not to make the same mistake again, pulling stuff first ;]. Thanks!

$ git pull
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 26 (delta 13), reused 26 (delta 13), pack-reused 0
Unpacking objects: 100% (26/26), 2.42 KiB | 123.00 KiB/s, done.
From github.com:crate/activerecord-crate-adapter
   735730f..96a8da2  activerecord4 -> origin/activerecord4
Updating 735730f..96a8da2
Fast-forward
 activerecord-crate-adapter.gemspec                                   |  2 +-
 lib/arel/visitors/crate.rb                                           |  2 +-
 spec/activerecord/connection_adapters/crate/table_definition_spec.rb |  4 ++--
 spec/data_types/array_spec.rb                                        | 20 ++++++++------------
 spec/data_types/object_spec.rb                                       | 14 +++++---------
 spec/dummy/app/models/post.rb                                        |  2 ++
 spec/models/post_spec.rb                                             | 32 ++++++++++++--------------------
 7 files changed, 31 insertions(+), 45 deletions(-)

Those are really valuable updates. It would have been so sad if they would have been lost. I am really relieved about it, that you have been able to restore them. Thanks and sorry again.

@amotl amotl mentioned this pull request Feb 13, 2024
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