Use Sorbet cache (if enabled)#2568
Open
amomchilov wants to merge 1 commit intoAlex/use-prism-in-sorbet-callsfrom
Open
Use Sorbet cache (if enabled)#2568amomchilov wants to merge 1 commit intoAlex/use-prism-in-sorbet-callsfrom
amomchilov wants to merge 1 commit intoAlex/use-prism-in-sorbet-callsfrom
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Apr 1, 2026
502c337 to
9c3e29b
Compare
1610659 to
3e06485
Compare
KaanOzkan
reviewed
Apr 1, 2026
| # `--cache-dir=` disables the cache, modeled here with a `nil` value | ||
| cache_dir: if (value = options["--cache-dir"]).is_a?(String) | ||
| value.empty? ? nil : value | ||
| end, |
Contributor
There was a problem hiding this comment.
I think this would be more readable outside of new, was there a specific reason to have it here?
Also should this use shellescape?
Contributor
Author
There was a problem hiding this comment.
Sure, I extracted local variables
Also should this use
shellescape?
I don't think so. The C++ code consumes these values directly, not mediated by a shell.
Contributor
There was a problem hiding this comment.
Sure, I extracted local variables
Did you?
Are we missing a push?
9c3e29b to
0189305
Compare
3e06485 to
57f7cb0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
If a repo has enabled the Sorbet cache, we should use it.
Implementation
Builds upon the
SorbetCache#2568.Performance
Shaves off around ~3s on the Shopify core monolith.
The cache stores the desugared ASTs, after the parsing, RBS rewriting, and desugaring is done. If there's a cache hit, no parsing happens, so that's why you see the legacy and Prism parsers have the same time. So this mitigates some of the benefit of #2567, but Prism is still helpful when there's a cache miss.
Tests
Added.