From 2a28c20b06e4cdc8c745319417be035dcf7e37a9 Mon Sep 17 00:00:00 2001 From: Ross Brandes Date: Mon, 12 Oct 2026 10:01:04 -0400 Subject: [PATCH] Delete the pregenerated RBI before tapioca runs e5282df meant to delete rbi/mocktail-pregenerated.rbi before generating, to stop tapioca from merging the previous build's RBI (which the gem exports from rbi/) into the new one. But it put the `rm` after `cd sub_projects/rbi_generator` while keeping the repo-relative path, so it targeted a file that never existed and `rm -f` failed silently. The feedback loop kept going: stale `# source://` comments, including references to sorbet-runtime 0.5.10983, piled up again in rbi/mocktail-pregenerated.rbi and in the sorbet_user sample project's RBI, which merges it in. Move the `rm` above the `cd` so it deletes the real file. A second ./script/build now produces a byte-identical RBI. The committed RBIs still carry the stale comments; they'll come out clean the next time they're regenerated. --- script/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/build b/script/build index 5fd5208..98a2031 100755 --- a/script/build +++ b/script/build @@ -33,8 +33,8 @@ require_relative "mocktail/sorbet" RUBY echo "----------> ❷ Generating sorbet sigs via tapioca in sub_projects/rbi_generator" -cd sub_projects/rbi_generator rm -f rbi/mocktail-pregenerated.rbi +cd sub_projects/rbi_generator rm -f sorbet/rbi/gems/mocktail@*.rbi bundle bundle exec tapioca gem --all --exclude=tapioca ast diff-lcs erubi netrc parser prettier_print racc rbi spoom syntax_tree thor unparser sorbet yard parallel yard-sorbet