Shopify / Shopify/liquid

Add support for specifying filters for parsing

Open
#1,314 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

Currently filters are only provided as a render option, which prevents us from checking if a filter call is valid during parsing and providing faster feedback about a bug in a template.

Also, we would like to use information about what filters will be available, along with what parameters they take, in liquid-c. That will allow us to skip render time checks to see if a filter is invokable and avoid the need to translate ArgumentError exceptions to Liquid::ArgumentError from passing in the wrong number of arguments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how filters are currently supplied as render options and how the parser handles filter calls. The work is done when filters and their parameter information are available during parsing, enabling invalid calls to fail earlier and providing the metadata needed by liquid-c.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.