Repository navigation
refactor(build): name the javac.pack span intersection with an intersect helper - #83
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
The PR adds an intersect helper to replace the double-subtract pattern subtract(r, subtract(r, compiler)) with the more direct intersect(r, compiler). The implementation correctly computes the intersection of two merged span lists, and the change is used only for the /lib/modules path when building javac.pack. The logic is mathematically equivalent and the tests confirm identical output for 20,000 random pairs.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve
What this changes
scripts/build-web.tsfound the parts of javac's reads inside the compiler modules assubtract(r, subtract(r, compiler)). Anintersect(spans, within)helper now says that directly. The packs it writes are the same.Tests
intersect(r, c)andsubtract(r, subtract(r, c))give the same spans for 20,000 random pairs of merged span lists.pnpm typecheckpasses.