From 21d3a6b9e1e12365853f5eb2aba50add29e91dac Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Tue, 10 Dec 2024 14:59:50 -0500 Subject: [PATCH 1/2] Revert "Don't attempt to load built-in compilers multiple times" --- lib/tapioca/loaders/dsl.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tapioca/loaders/dsl.rb b/lib/tapioca/loaders/dsl.rb index 9981a831f..cd249e592 100644 --- a/lib/tapioca/loaders/dsl.rb +++ b/lib/tapioca/loaders/dsl.rb @@ -85,7 +85,12 @@ def load_dsl_extensions def load_dsl_compilers say("Loading DSL compiler classes... ") - # Load built-in compilers and custom compilers exported from gems + # Load all built-in compilers + Dir.glob("#{Tapioca::LIB_ROOT_DIR}/tapioca/dsl/compilers/*.rb").each do |compiler| + require File.expand_path(compiler) + end + + # Load all custom compilers exported from gems ::Gem.find_files("tapioca/dsl/compilers/*.rb").each do |compiler| require File.expand_path(compiler) end From 481d6a449cd5fed9b331fb4b368b0449d4ab787a Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Tue, 10 Dec 2024 15:02:11 -0500 Subject: [PATCH 2/2] Make the relationship explicit in the comment --- lib/tapioca/loaders/dsl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tapioca/loaders/dsl.rb b/lib/tapioca/loaders/dsl.rb index cd249e592..2f8a945c5 100644 --- a/lib/tapioca/loaders/dsl.rb +++ b/lib/tapioca/loaders/dsl.rb @@ -85,7 +85,7 @@ def load_dsl_extensions def load_dsl_compilers say("Loading DSL compiler classes... ") - # Load all built-in compilers + # Load all built-in compilers before any custom compilers Dir.glob("#{Tapioca::LIB_ROOT_DIR}/tapioca/dsl/compilers/*.rb").each do |compiler| require File.expand_path(compiler) end