Skip to content

Delete the pregenerated RBI before tapioca runs - #33

Merged
rosston merged 1 commit into
mainfrom
fix-rbi-feedback-loop
Oct 12, 2026
Merged

rosston merged 1 commit into
mainfrom
fix-rbi-feedback-loop

Conversation

@rosston

@rosston rosston commented Oct 12, 2026

Copy link
Copy Markdown
Member

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.

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.
@rosston rosston self-assigned this Oct 12, 2026
@rosston
rosston merged commit 09c3a01 into main Oct 12, 2026
10 checks passed
@rosston
rosston deleted the fix-rbi-feedback-loop branch October 12, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant