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

Support ruby3 #18

Merged
merged 19 commits into from
Apr 12, 2024
Merged

Support ruby3 #18

merged 19 commits into from
Apr 12, 2024

Conversation

winebarrel
Copy link
Contributor

@winebarrel winebarrel commented Apr 2, 2024

Supports Ruby 3.0 based on https://github.com/matsubara0507/double_write_cache_stores/tree/support-ruby3 .
Also made fixes for RuboCop. ea4306d

@hirocaster @matsubara0507 Could you please review?

@winebarrel winebarrel changed the title [WIP] Support ruby3 Support ruby3 Apr 2, 2024
@winebarrel winebarrel marked this pull request as ready for review April 2, 2024 03:19
@@ -364,21 +364,6 @@ def get_or_read(store, key)
it_behaves_like "cache store example", one_cache_store
end
end

context "ActiveSupport :dalli_store in Dalli" do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove these specs?

Copy link
Contributor Author

@winebarrel winebarrel Apr 2, 2024

Choose a reason for hiding this comment

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

This test was removed in 5b0bdaa, probably because dalli_store was removed from dalli 3.0.
cf. https://stackoverflow.com/a/76655389

An error occurred while loading ./spec/double_write_cache_stores/client_spec.rb.
Failure/Error: read_and_write_store = ActiveSupport::Cache.lookup_store :dalli_store, "localhost:11211"

RuntimeError:
  Could not find cache store adapter for dalli_store (cannot load such file -- active_support/cache/dalli_store)
# ./spec/double_write_cache_stores/client_spec.rb:369:in `block (3 levels) in <top (required)>'
# ./spec/double_write_cache_stores/client_spec.rb:368:in `block (2 levels) in <top (required)>'
# ./spec/double_write_cache_stores/client_spec.rb:349:in `block in <top (required)>'
# ./spec/double_write_cache_stores/client_spec.rb:11:in `<top (required)>'
# ------------------
# --- Caused by: ---
# LoadError:
#   cannot load such file -- active_support/cache/dalli_store
#   ./spec/double_write_cache_stores/client_spec.rb:369:in `block (3 levels) in <top (required)>'

Finished in 0.00002 seconds (files took 0.70444 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

cc @matsubara0507

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, that sounds good.
Could you update Support backend cache store in README.md ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed README 🙏 b7255a5

@winebarrel winebarrel requested a review from hirocaster April 2, 2024 04:01
@@ -3,4 +3,4 @@
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "double_write_cache_stores"
require "dalli"
require "dalli/cas/client"
require "dalli/client"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a fix for the warning below:

You can remove require 'dalli/cas/client' as this code has been rolled into the standard 'dalli/client'.

@winebarrel winebarrel force-pushed the support-ruby3 branch 2 times, most recently from 31b04d3 to 773ea63 Compare April 4, 2024 08:52
@winebarrel
Copy link
Contributor Author

@hirocaster Could you please check PR? 🙇

@@ -364,21 +364,6 @@ def get_or_read(store, key)
it_behaves_like "cache store example", one_cache_store
end
end

context "ActiveSupport :dalli_store in Dalli" do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, that sounds good.
Could you update Support backend cache store in README.md ?

@winebarrel winebarrel requested a review from hirocaster April 11, 2024 04:35
@hirocaster hirocaster merged commit dd15192 into mixigroup:master Apr 12, 2024
25 checks passed
@winebarrel winebarrel deleted the support-ruby3 branch April 12, 2024 05:50
@winebarrel
Copy link
Contributor Author

🙏

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.

3 participants