Skip to content

Fix infinite loop in automatic deprecation rewrite #19396#19493

Open
Zinnia-Nagpal wants to merge 1 commit intopharo-project:Pharo14from
Zinnia-Nagpal:fix-infinite-loop-19396
Open

Fix infinite loop in automatic deprecation rewrite #19396#19493
Zinnia-Nagpal wants to merge 1 commit intopharo-project:Pharo14from
Zinnia-Nagpal:fix-infinite-loop-19396

Conversation

@Zinnia-Nagpal
Copy link
Copy Markdown

Fixes #19396

Problem

When showWarning is true, Deprecation>>defaultAction calls
logTranscript which signals DeprecationPerformedNotification.
This can trigger defaultAction again before RecursionStopper
inside transform is ever reached, causing an infinite loop.

This only manifests in headless CI where isInteractiveGraphic
returns false.

Fix

Wrap the entire defaultAction in RecursionStopper in both
Deprecation and BackwardCompatibility classes.

Test

Added testNoInfiniteLoopWhenShowWarningIsTrue to DeprecationTest.

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.

Infinite loop on automatic rewrite

1 participant