From 21f1763ebaa57844eb6b4829df40920d5f1d3e76 Mon Sep 17 00:00:00 2001 From: Adam Daniels Date: Mon, 1 Apr 2024 19:52:19 -0400 Subject: [PATCH] Do not eager load i18n message backend This backend has a dependency on the i18n library which may not be available in all environments. --- lib/dry/schema.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dry/schema.rb b/lib/dry/schema.rb index 33213ae4..3e1ea18a 100644 --- a/lib/dry/schema.rb +++ b/lib/dry/schema.rb @@ -32,6 +32,7 @@ def self.loader "#{root}/dry/schema/{constants,errors,version,extensions}.rb", "#{root}/dry/schema/extensions" ) + loader.do_not_eager_load("#{root}/dry/schema/messages/i18n.rb") loader.inflector.inflect("dsl" => "DSL") end end