fix: add base64 gem dependency for Ruby 3.3+ compatibility#2108
Open
wasim-builds wants to merge 3 commits into
Open
fix: add base64 gem dependency for Ruby 3.3+ compatibility#2108wasim-builds wants to merge 3 commits into
wasim-builds wants to merge 3 commits into
Conversation
The base64 gem is no longer part of the default gems since Ruby 3.4.0. Without an explicit dependency, requiring it on Ruby 3.3+ produces a deprecation warning, and on Ruby 3.4+ it will raise a LoadError. The bigdecimal gem was already added as a dependency to address the same issue; this adds base64 to complete the fix for Shopify#1772.
Author
|
I have signed the CLA! |
Author
|
By the way, I've really been enjoying contributing to this project! My goal is to get more involved in open source to help maintain projects and learn from great engineering teams. Is there a process or pathway for becoming a member of the Shopify GitHub organization? I'd love to continue helping out where I can! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
base64gem as an explicit dependency inliquid.gemspec.Problem
The
base64gem was loaded from the standard library in Ruby 3.3, producing this deprecation warning:Starting with Ruby 3.4, the
base64gem is no longer part of the default gems, meaningrequire 'base64'will raise aLoadErrorunless the gem is explicitly depended on.This is the second half of the fix for #1772 -- the
bigdecimaldependency was already added previously.Changes
liquid.gemspec: Addeds.add_dependency("base64")Testing
This is a gemspec-level dependency declaration change. No code logic is modified, so existing tests continue to pass. The fix ensures that
require 'base64'inlib/liquid/standardfilters.rbworks without deprecation warnings on Ruby 3.3+ and without errors on Ruby 3.4+.