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

This gem doesn't work on Ruby 3.1 due to a breaking change of YAML#load #34

Closed
tomgi opened this issue Mar 9, 2022 · 6 comments · Fixed by #36
Closed

This gem doesn't work on Ruby 3.1 due to a breaking change of YAML#load #34

tomgi opened this issue Mar 9, 2022 · 6 comments · Fixed by #36

Comments

@tomgi
Copy link
Contributor

tomgi commented Mar 9, 2022

Ruby 3.1 comes with Psych 4.0 bundled, which changes YAML#load to behave like YAML#safe_load (instead of YAML#unsafe_load). See ruby/psych#487 for more details.

This results in Psych::DisallowedClass: Tried to load unspecified class: for all registered async subscriber classes.

@alexisraca
Copy link

gem looks abandoned

SeanLF added a commit to Hivebrite/wisper-sidekiq that referenced this issue Jun 23, 2022
@moiristo
Copy link

moiristo commented Aug 4, 2022

@krisleech this is also preventing us from upgrading to ruby 3. Could you please merge it in or let us know if we need to create a swanky-wisper-sidekiq gem instead?

@patrickemuller
Copy link

@krisleech Do we have a schedule or at least a timeline for this? Don't want to rush, but Ruby 3 is kinda awesome and we want to use in our app too

@GMorris-professional
Copy link

@moiristo and @patrickemuller I would be happy to assist with swanky-wisper-sidekiq in the mean time though you can create a custom broadcaster for Wisper(see: https://github-wiki-see.page/m/krisleech/wisper/wiki/Write-custom-broadcasters) that fixes the issue with ::YAML.load issue and use that in your ruby 3 app.

@moiristo
Copy link

Forked to https://github.com/bookingexperts/wisper-sidekiq and applied Sean's patch there for now.

@tomgi
Copy link
Contributor Author

tomgi commented Feb 2, 2023

I opened a pull request with an alternative solution that uses ::YAML.safe_load by default, and requires custom types to be explicitly registered if used as event arguments #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants