Remove warnings system

This commit is contained in:
Charles-P. Clermont
2026-01-14 09:55:21 -05:00
parent 40b1f83f25
commit f4a5454cd6
5 changed files with 6 additions and 22 deletions
+1 -6
View File
@@ -60,10 +60,6 @@ module Liquid
end
# rubocop:enable Metrics/ParameterLists
def warnings
@warnings ||= []
end
def strainer
@strainer ||= @environment.create_strainer(self, @filters)
end
@@ -157,7 +153,6 @@ module Liquid
subcontext.filters = @filters
subcontext.strainer = nil
subcontext.errors = errors
subcontext.warnings = warnings
subcontext.disabled_tags = @disabled_tags
end
end
@@ -244,7 +239,7 @@ module Liquid
protected
attr_writer :base_scope_depth, :warnings, :errors, :strainer, :filters, :disabled_tags
attr_writer :base_scope_depth, :errors, :strainer, :filters, :disabled_tags
private
+2 -3
View File
@@ -3,14 +3,13 @@
module Liquid
class ParseContext
attr_accessor :locale, :line_number, :trim_whitespace, :depth
attr_reader :partial, :warnings, :environment
attr_reader :partial, :environment
def initialize(options = Const::EMPTY_HASH)
@environment = options.fetch(:environment, Environment.default)
@template_options = options ? options.dup : {}
@locale = @template_options[:locale] ||= I18n.new
@warnings = []
@locale = @template_options[:locale] ||= I18n.new
# constructing new StringScanner in Lexer, Tokenizer, etc is expensive
# This StringScanner will be shared by all of them
+1 -2
View File
@@ -16,7 +16,7 @@ module Liquid
#
class Template
attr_accessor :root, :name
attr_reader :resource_limits, :warnings
attr_reader :resource_limits
attr_reader :profiler
@@ -209,7 +209,6 @@ module Liquid
ParseContext.new(opts)
end
@warnings = parse_context.warnings
parse_context
end