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

WIP: Support liquid 5.4.0 in order to support ruby 3.2 #479

Closed
wants to merge 1 commit into from

Conversation

isimluk
Copy link

@isimluk isimluk commented Dec 25, 2022

The following errors is raised when jekyll-seo-tag is used with liquid-5.4.0. This is caused by the fact that context.registers no longer returns Hash, but Liquid::Registers.

Addressing:

/opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:176:in `render': undefined method `each' for #<Liquid::Registers:0x00007f2b142ddfc0>

        options[:registers]&.each do |key, register|
                           ^^^^^^
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:204:in `render!'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/jekyll-seo-tag-2.8.0/lib/jekyll-seo-tag.rb:36:in `render'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/tag.rb:51:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:80:in `render_node'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:230:in `render_node'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:213:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/document.rb:41:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:194:in `render'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:204:in `render!'

Related to jekyll/jekyll#9229

The following errors is raised when jekyll-seo-tag is used with
liquid-5.4.0. This is caused by the fact that context.registers
no longer returns Hash, but Liquid::Registers.

Addressing:
/opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:176:in `render': undefined method `each' for #<Liquid::Registers:0x00007f2b142ddfc0>

        options[:registers]&.each do |key, register|
                           ^^^^^^
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:204:in `render!'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/jekyll-seo-tag-2.8.0/lib/jekyll-seo-tag.rb:36:in `render'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/tag.rb:51:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:80:in `render_node'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:230:in `render_node'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/block_body.rb:213:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/document.rb:41:in `render_to_output_buffer'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:194:in `render'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/liquid-5.4.0/lib/liquid/template.rb:204:in `render!'

Related to: jekyll/jekyll#9229
@isimluk isimluk changed the title Support liquid 5.4.0 in order to support ruby 3.2 WIP: Support liquid 5.4.0 in order to support ruby 3.2 Dec 26, 2022
@isimluk
Copy link
Author

isimluk commented Dec 26, 2022

Closing as I believe the proper fix needs to go to liquid: Shopify/liquid#1663

@isimluk isimluk closed this Dec 26, 2022
@ashmaroli
Copy link
Member

Good call @isimluk 👍

@jekyll jekyll locked and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants