Replace catching StackOverflowError with fuel#25937
Draft
SolalPirelli wants to merge 4 commits into
Draft
Conversation
SolalPirelli
commented
Apr 27, 2026
| T#T#T#T#T#T#T#T#T#T#T#T#T#T#T#T# | ||
| T#T#T#T#T#T#T#T#T#T#T#T#T#T#T#T# | ||
| T#T#T#T#T#T#T#T#T#T#T#T#T#T#T#T# | ||
| T#T#T#T#T#T#T#T#T#T#T#T#T#T#T#T# |
Contributor
Author
958aabd to
1e2b230
Compare
bishabosha
reviewed
Apr 29, 2026
| else deps.updated(referenced, newSet) | ||
|
|
||
| def traverse(t: Type) = try | ||
| def traverse(t: Type) = ctx.handleRecursive("adjust", t.show): |
Member
There was a problem hiding this comment.
this still relies on stack recursion no? (mutual recursion via traverseChildren)
Contributor
Author
There was a problem hiding this comment.
Yes, this PR doesn't change the use of recursion, it changes how stack overflows are detected.
bishabosha
reviewed
Apr 29, 2026
| def computeTypeProxy = { | ||
| def computeTypeProxy = ctx.handleRecursive("type proxy of", i"$tp"): | ||
| val superTp = tp.superType | ||
| val baseTp = recur(superTp) |
Member
There was a problem hiding this comment.
each call to recur still increases stack depth right?
Contributor
Author
There was a problem hiding this comment.
Yeah there are ~20 calls to handleRecursive that try and detect potential stack overflows, it'd be nice to rewrite the entire compiler to use an amount of stack space not dependent on user input but that's for (much) later.
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.
Part of #25799
0 new OpenCB failures: https://scala3.westeurope.cloudapp.azure.com/dashboard/compare?baseScalaVersion=3.9.0-RC1-bin-20260512-954f390&targetBuildId=dotty-staging%2Fdotty%3Asolal%2Ffuel%3A2026-05-12
How much have you relied on LLM-based tools in this contribution?
Not at all
How was the solution tested?
Covered by existing tests (this is a refactoring)