Skip to content

Commit c116258

Browse files
committed
Reorder requires so the RBS rewriter gets loaded first
Signed-off-by: Alexandre Terrasa <[email protected]>
1 parent 745577d commit c116258

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/tapioca/internal.rb

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
require "tapioca/runtime/reflection"
88
require "tapioca/runtime/trackers"
99

10+
# The rewriter needs to be loaded very early so RBS comments within Tapioca itself are rewritten
11+
require "spoom"
12+
require "tapioca/rbs/rewriter"
13+
# ^ Do not change the order of these requires
14+
1015
require "benchmark"
1116
require "bundler"
1217
require "erb"
@@ -32,7 +37,6 @@
3237
require "tapioca/sorbet_ext/proc_bind_patch"
3338
require "tapioca/runtime/generic_type_registry"
3439

35-
require "spoom"
3640
require "tapioca/helpers/gem_helper"
3741
require "tapioca/helpers/git_attributes"
3842
require "tapioca/helpers/sorbet_helper"
@@ -61,5 +65,3 @@
6165
require "tapioca/dsl"
6266
require "tapioca/commands"
6367
require "tapioca/cli"
64-
65-
require "tapioca/rbs/rewriter"

0 commit comments

Comments
 (0)