-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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: Experiments with liquid 5.x #9229
base: master
Are you sure you want to change the base?
Changes from all commits
bc0adc2
b33dd6e
0fbed5c
7cb6c87
22961f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -14,16 +14,24 @@ jobs: | |||||||
ci: | ||||||||
name: "Run Tests (${{ matrix.label }})" | ||||||||
runs-on: "ubuntu-latest" | ||||||||
env: | ||||||||
LIQUID_VERSION: ${{ matrix.liquid_version }} | ||||||||
strategy: | ||||||||
fail-fast: false | ||||||||
matrix: | ||||||||
include: | ||||||||
- label: Ruby 2.7 | ||||||||
ruby_version: "2.7" | ||||||||
- label: Ruby 2.7 with Liquid v4 | ||||||||
ruby_version: "2.7" | ||||||||
liquid_version: "~> 4.0" | ||||||||
- label: Ruby 3.0 | ||||||||
ruby_version: "3.0" | ||||||||
- label: Ruby 3.1.2 | ||||||||
ruby_version: "3.1.2" | ||||||||
- label: Ruby 3.1.2 with Liquid v4 | ||||||||
ruby_version: "3.1.2" | ||||||||
liquid_version: "~> 4.0" | ||||||||
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
- label: JRuby 9.4.0.0 | ||||||||
ruby_version: "jruby-9.4.0.0" | ||||||||
steps: | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,6 +3,12 @@ | |||||||||||||||||||||
source "https://rubygems.org" | ||||||||||||||||||||||
gemspec :name => "jekyll" | ||||||||||||||||||||||
|
||||||||||||||||||||||
if ENV["LIQUID_VERSION"].to_s.empty? | ||||||||||||||||||||||
gem "liquid", "~> 5.3.0" | ||||||||||||||||||||||
else | ||||||||||||||||||||||
gem "liquid", ENV["LIQUID_VERSION"] | ||||||||||||||||||||||
end | ||||||||||||||||||||||
Comment on lines
+6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
gem "rake", "~> 13.0" | ||||||||||||||||||||||
|
||||||||||||||||||||||
group :development do | ||||||||||||||||||||||
|
@@ -86,7 +92,6 @@ group :jekyll_optional_dependencies do | |||||||||||||||||||||
|
||||||||||||||||||||||
platforms :ruby, :mswin, :mingw, :x64_mingw do | ||||||||||||||||||||||
gem "classifier-reborn", "~> 2.2" | ||||||||||||||||||||||
gem "liquid-c", "~> 4.0" | ||||||||||||||||||||||
gem "yajl-ruby", "~> 1.4" | ||||||||||||||||||||||
end | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -21,6 +21,10 @@ environment: | |||
- RUBY_FOLDER_VER: "27" | ||||
TZINFO_VERSION: "~> 2.0" | ||||
TEST_SUITE: "test" | ||||
- RUBY_FOLDER_VER: "27" | ||||
LIQUID_VERSION: "~> 4.0" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
TZINFO_VERSION: "~> 2.0" | ||||
TEST_SUITE: "test" | ||||
- RUBY_FOLDER_VER: "27" | ||||
TEST_SUITE: "default-site" | ||||
- RUBY_FOLDER_VER: "27" | ||||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s| | |||||||||||
s.add_runtime_dependency("jekyll-watch", "~> 2.0") | ||||||||||||
s.add_runtime_dependency("kramdown", "~> 2.3", ">= 2.3.1") | ||||||||||||
s.add_runtime_dependency("kramdown-parser-gfm", "~> 1.0") | ||||||||||||
s.add_runtime_dependency("liquid", "~> 4.0") | ||||||||||||
s.add_runtime_dependency("liquid", ">= 4.0", "< 5.4") | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am fine with this as far as you are. But we need to depend on liquid < 5.4.
5.4 breaks further as you can see in the the test CI run on my repo: https://github.com/isimluk/jekyll/actions/runs/3777777021/jobs/6421776463 liquid 5.4.0 changed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I actually tend to think that is good idea. But how do you feel about the removal of liquid-c support that this PR currently brings ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah setting the latest allowed version to 5.4 sounds reasonable to me. Removing liquid-c is outside my understanding. It looks like it was introduced years ago, but wasn't actually being required until #7792 came along. Maybe it's fine to remove |
||||||||||||
s.add_runtime_dependency("mercenary", ">= 0.3.6", "< 0.5") | ||||||||||||
s.add_runtime_dependency("pathutil", "~> 0.9") | ||||||||||||
s.add_runtime_dependency("rouge", ">= 3.0", "< 5.0") | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
module Liquid | ||
class Expression | ||
class MethodLiteral | ||
attr_reader :method_name, :to_s | ||
alias_method :to_liquid, :to_s | ||
|
||
def initialize(method_name, to_s) | ||
@method_name = method_name | ||
@to_s = to_s | ||
end | ||
end | ||
|
||
PATCHED_LITERALS = Liquid::Expression::LITERALS.dup.tap do |obj| | ||
obj["blank"] = MethodLiteral.new(:blank?, "").freeze | ||
obj["empty"] = MethodLiteral.new(:empty?, "").freeze | ||
end | ||
|
||
remove_const :LITERALS | ||
LITERALS = PATCHED_LITERALS.freeze | ||
|
||
remove_const :PATCHED_LITERALS | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.