Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle suspension due to macro call in arbitrary phases #21651

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 26, 2024

Previously we only supported suspension in Typer and Inliner. In the added test
case this happens in PostTyper, but I've seen it happen in Mixin too.

Fixes #18517.

@smarter smarter changed the title Handle suspension due to macro call in late phases Handle suspension due to macro call in arbitrary phases Sep 26, 2024
Previously we only supported suspension in Typer and Inliner. In the added test
case this happens in PostTyper, but I've seen it happen in Mixin too.

Fixes scala#18517.
@smarter smarter force-pushed the i18517 branch 2 times, most recently from 9367900 to bac8781 Compare September 26, 2024 15:02
@smarter smarter requested a review from odersky September 26, 2024 17:57
@smarter smarter merged commit 5ec1e8b into scala:main Sep 27, 2024
28 checks passed
@smarter smarter deleted the i18517 branch September 27, 2024 14:11
@smarter smarter added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Sep 27, 2024
@WojciechMazur WojciechMazur added this to the 3.6.0 milestone Oct 8, 2024
@WojciechMazur WojciechMazur removed the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Nov 8, 2024
hamzaremmal added a commit that referenced this pull request Nov 26, 2024
Related PR: #21651
There, a mechanism was added to the Phase classes, where any phase could
catch a SuspendException and have a compilation unit suspended (stopped
and recompiled later). In this fix, we rethrow incorrectly caught
SuspendExceptions, so that the aforementioned mechanism can take care of
the rest.
Fixes: #21983
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.

Compiler crash with SuspendException happening during PostTyper
3 participants