Skip to content

Upgrade to Liquid v4 - #4362

Merged
jekyllbot merged 15 commits into
masterfrom
liquid-4
Jan 27, 2017
Merged

Upgrade to Liquid v4#4362
jekyllbot merged 15 commits into
masterfrom
liquid-4

Conversation

@parkr

@parkr parkr commented Jan 16, 2016

Copy link
Copy Markdown
Member

RC1 for now.

@fw42 @dylanahsmith, know what's going on here? .parse isn't working like before.

Error:
TestTags#test_: highlight tag in unsafe mode should recognize the hl_linenos option and its value. :
NoMethodError: undefined method `line_number' for {}:Hash
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/liquid-4.0.0.rc1/lib/liquid/tag.rb:21:in `initialize'
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/liquid-4.0.0.rc1/lib/liquid/block.rb:4:in `initialize'
    /Users/parkr/jekyll/jekyll/lib/jekyll/tags/highlight.rb:14:in `initialize'
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/liquid-4.0.0.rc1/lib/liquid/tag.rb:9:in `new'
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/liquid-4.0.0.rc1/lib/liquid/tag.rb:9:in `parse'
    test/test_tags.rb:46:in `highlight_block_with_opts'
    test/test_tags.rb:92:in `block (2 levels) in <class:TestTags>'
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/shoulda-context-1.2.1/lib/shoulda/context/context.rb:413:in `instance_exec'
    /Users/parkr/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/shoulda-context-1.2.1/lib/shoulda/context/context.rb:413:in `block in create_test_from_should_hash'

@parkr parkr added this to the 3.2 milestone Jan 16, 2016
@dylanahsmith

Copy link
Copy Markdown

Jekyll::Tags::HighlightBlock.parse('highlight', options_string, ["test", "{% endhighlight %}", "\n"], {})
passes in a list of tokens into a Tag, but we now use a tokenizer which also keeps track of the current line number during parsing.

This could be worked around by using Liquid::Tokenizer.new("test{% endhighlight %}\n"), but the tests would still be brittle to internal liquid changes, so it is recommended to parse a complete template using Liquid::Template rather than constructing individual tags with mocked out data.

@envygeeks

Copy link
Copy Markdown
Contributor

Would this affect normal everyday plugins @dylanahsmith ?

@parkr

parkr commented Jan 16, 2016

Copy link
Copy Markdown
Member Author

it is recommended to parse a complete template using Liquid::Template rather than constructing individual tags with mocked out data.

👍

Would this affect normal everyday plugins

This looks like it's only in our tests where this is going to be an issue. Most plugins don't use this Tag.parse method directly, I think only our tests do that.

@parkr

parkr commented Mar 23, 2016

Copy link
Copy Markdown
Member Author

@dylanahsmith Our tests depend on having access to the instance created. I gave it a shot with Liquid::Template.parse but gave up after about 30 minutes of looking through the Liquid code.

It looks like v4 works (CI works fine for me locally). Would you consider releasing a new version soon and we can upgrade?

@parkr

parkr commented Aug 30, 2016

Copy link
Copy Markdown
Member Author

@dylanahsmith @fw42 @pushrax Hi! Would it be possible to reconsider a 4.0 release? Especially keen to get the whitespace change out to our users. Thanks!

@fw42

fw42 commented Aug 30, 2016

Copy link
Copy Markdown
Contributor

I'm ok with releasing a new version of Liquid. As far as I know, there isn't any pending non-backwards compatible changes that we want to get in before a new release. @pushrax @dylanahsmith, thoughts?

@dylanahsmith

Copy link
Copy Markdown

version ⬆️ 👍

@pushrax

pushrax commented Sep 1, 2016

Copy link
Copy Markdown

Also 🆗 from me

@DirtyF

DirtyF commented Sep 13, 2016

Copy link
Copy Markdown
Member

@fw42

fw42 commented Sep 13, 2016

Copy link
Copy Markdown
Contributor

Yea I just released 4.0rc versions of both Liquid and Liquid-C. @parkr, can you see if everything works on your end? If so, I can release a real non-rc release.

@parkr

parkr commented Sep 16, 2016

Copy link
Copy Markdown
Member Author

Interesting –– all of our where_exp tests fail.

@parkr

parkr commented Oct 19, 2016

Copy link
Copy Markdown
Member Author

Looks like things are working here. I'd be interested in getting this into a v3.4, though I have concerns about what incompatibilities for plugin authors.

@Crunch09

Copy link
Copy Markdown
Member

@parkr I think the only public API thing we changed was to add Jekyll::Drop::SiteDrop#key?. Do you know of any liquid-related plugins so we could check them out before?

Also if you think we're ok, we could give @fw42 a go to release 4.0 non-rc 🎆

@parkr

parkr commented Nov 29, 2016

Copy link
Copy Markdown
Member Author

@fw42 If this CI passes, then feel free to release v4.0 of Liquid. ❤️

@pathawks pathawks mentioned this pull request Dec 22, 2016
@DirtyF DirtyF mentioned this pull request Jan 10, 2017
@JamesDrummond

Copy link
Copy Markdown

When will this PR be merged? Patiently waiting for liquid 4.0 features ;) . Also I was trying to find where you list when the next release and ship date is planned for.

@parkr

parkr commented Jan 10, 2017

Copy link
Copy Markdown
Member Author

I think we'll try to ship a 3.4 this week, with a 3.5 a bit after that.

@parkr

parkr commented Jan 16, 2017

Copy link
Copy Markdown
Member Author

Fixes #5772.

@parkr parkr modified the milestones: 3.4, 3.5 Jan 16, 2017
@keslert

keslert commented Jan 24, 2017

Copy link
Copy Markdown

Any update on this? Waiting not quite as patiently as @JamesDrummond ;).

@Crunch09

Copy link
Copy Markdown
Member

@keslert It is planned to be released in jekyll 3.5. Jekyll 3.4 should be out this week, so it probably will be merged in afterwards.

@parkr

parkr commented Jan 27, 2017

Copy link
Copy Markdown
Member Author

@jekyllbot: merge +minor

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.