Skip to content

Conversation

@dylanahsmith
Copy link
Contributor

Problem

@samdoiron found a bug in #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.

@dylanahsmith dylanahsmith requested a review from samdoiron July 18, 2022 21:26
strategy:
matrix:
entry:
- { ruby: '2.5', allowed-failure: false }
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 needed because of ruby liquid dropping support for EOL ruby versions (Shopify/liquid#1578)

@samdoiron
Copy link
Contributor

samdoiron commented Jul 19, 2022

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

Instead, parse_context.parse_expression should generally be used.
If a constant expression is desired, then Liquid::C::Expression can
be used.
@dylanahsmith dylanahsmith force-pushed the remove-liquid-expression-parse-patch branch from 40f8336 to 4940ede Compare July 19, 2022 14:50
@dylanahsmith dylanahsmith merged commit 8e4920f into master Jul 19, 2022
@dylanahsmith dylanahsmith deleted the remove-liquid-expression-parse-patch branch July 19, 2022 14:56
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