Skip to content

[Backport] Avoid crash by relaxing TyperState assertion #13296

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

Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Aug 16, 2021

This backports #13150 which fixes a regression introduced in 3.0.1.

Flushing a reporter might force error messages (in particular when a
StoreReporter is flushed into a non-StoreReporter), and the TyperState
of the context captured in an error message might already be committed
at this point. In ea6449f I tried to
deal with this by flushing before committing but that's not sufficient
since the reporter we're flushing might contain error messages from a
more deeply nested TyperState. So this commit just relaxes the assertion
(ideally we would also check that only TyperStates created in a
committed TyperState can be committed in one, but keeping track of that
would require an extra field in TyperState).
@smarter smarter merged commit c7a2586 into scala:release-3.0.2 Aug 16, 2021
@smarter smarter deleted the backport-relax-tstate-assert branch August 16, 2021 18:25
@dlwh
Copy link

dlwh commented Aug 27, 2021

Hi, does this mean that 3.0.2-RC1 should have this fix? I have a similar bug that repros against the RC but don't want to waste people's time if it's already fixed

@dlwh
Copy link

dlwh commented Aug 27, 2021

err, nevermind, reproed in RC2 which clearly should have the fix. I will file a bug

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.

4 participants