Shopify / liquid-c

Liquid performance extension in C.
MIT License
119 stars 24 forks source link

Remove liquid expression parse patch #178

Closed dylanahsmith closed 2 years ago

dylanahsmith commented 2 years ago

Problem

@samdoiron found a bug in https://github.com/Shopify/liquid-c/pull/154, where parse_context.parse_expression would not respect disable_liquid_c_nodes: true, because even though that would make sure that Liquid::Expression.ruby_parse gets used, it would internally call the hard coded Liquid::Expression.parse that would use Liquid::C::Expression.lax_parse.

Solution

Get rid of the Liquid::Expression.parse monkey patch and instead require the application to use Liquid::C::Expression.parse if they really want to create a constant Liquid::C::Expression object.

samdoiron commented 2 years ago

Edit: Ignore that last, it was because of local changes I had made while debugging myself, sorry.