Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency constraint to allow for liquid v5.0.0 #8535

Open
jekyllbot opened this issue Jan 6, 2021 · 16 comments 路 May be fixed by #8662
Open

Update dependency constraint to allow for liquid v5.0.0 #8535

jekyllbot opened this issue Jan 6, 2021 · 16 comments 路 May be fixed by #8662
Labels
dependency has-pull-request Somebody suggested a solution to fix this issue pinned
Milestone

Comments

@jekyllbot
Copy link
Contributor

Hey there! 馃憢

I noticed that the constraint you have for liquid doesn't allow for the latest version to be used.

The constraint I found was ~> 4.0, and the latest version available is 5.0.0.

Can you look into updating that constraint so our users can use the latest and greatest version? Thanks! 馃挒

@jaredcwhite
Copy link

FWIW, we had to make a breaking change to support Liquid 5. bridgetownrb/bridgetown#224

Seems that for conditionals (aka in the where filter), '', blank, and empty are now all equivalent, since there's no clear way to detect '' vs. blank/empty.

@ADTC
Copy link

ADTC commented Mar 27, 2021

I was also wondering why Jekyll isnt using Liquid 5 yet. What do Shopify/liquid maintainers say about the breaking change?

@DirtyF DirtyF pinned this issue Mar 27, 2021
@DirtyF
Copy link
Member

DirtyF commented Mar 27, 2021

@jaredcwhite Thanks for the tip, our test suite is still failing when I apply your fix 馃し also Liquid-c 5.0 hasn't been released yet.

@skatkov skatkov linked a pull request May 4, 2021 that will close this issue
@jekyllbot jekyllbot added the has-pull-request Somebody suggested a solution to fix this issue label May 4, 2021
@SimonEast
Copy link

Is there a way to force my Jekyll installation to use Liquid 5 or 5.1? Liquid performance is pretty poor in the current Jekyll release, and I'd like to see if the later versions have improved performance.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@lizzby

This comment has been minimized.

@ashmaroli
Copy link
Member

ashmaroli commented Nov 28, 2021

Is there a way to force my Jekyll installation to use Liquid 5 or 5.1?

@SimonEast No, Officially, you can't force Jekyll to use Liquid 5+.

However, there is a workaround (via a nasty hack).

  • Clone the Liquid repository.
  • Checkout one of the release-tags (v5.1.0 / v5.0.1 / v5.0.0) (if you don't want to use unreleased changes).
  • Change the vesion-string in lib/liquid/version.rb to be something in the 4.x series.
  • Update your Gemfile to use the local clone:
    # Gemfile
    
    gem "liquid", path: "path/to/local_repo"
  • Then invoke Jekyll via Bundler. e.g. bundle exec jekyll build

@unfor19
Copy link

unfor19 commented Jul 2, 2022

@ashmaroli Thank you for this! I've added your solution to my Makefile + Gemfile files

Makefile

.EXPORT_ALL_VARIABLES:
ROOT_DIR=${PWD}
LIQUID_VERSION=v5.3.0
LIQUID_PATH=${ROOT_DIR}/.liquid-${LIQUID_VERSION}
LIQUID_LIB_PATH=${ROOT_DIR}/${LIQUID_PATH}/lib
LIQUID_VERSION_PATH=${LIQUID_LIB_PATH}/liquid/version.rb

ifneq ("$(wildcard /${LIQUID_VERSION_PATH})","")
LIQUID_VERSION_PATH_EXISTS=true
else
LIQUID_VERSION_PATH_EXISTS=false
endif


fix-liquid:
	@if [ ${LIQUID_VERSION_PATH_EXISTS} = true ] ; then \
		git clone  --branch ${LIQUID_VERSION} https://github.com/Shopify/liquid.git ${LIQUID_PATH} && \
    	cd ${LIQUID_PATH} && \
    	git switch -c ${LIQUID_VERSION} && \
    	sed -i.bak 's~${LIQUID_VERSION}~4.0.3~' ${LIQUID_VERSION_PATH} ; \
	fi

bundle-jekyll: fix-liquid
	pwd
	ls -lh
	bundle exec jekyll build
	ls -lh

Gemfile

gem "jekyll", "~> 4.2.2"
gem "liquid", "4.0.3", path: ".liquid-v5.3.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency has-pull-request Somebody suggested a solution to fix this issue pinned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants