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

Introducing useful event when a debug session has been cleared, so that all subscribers can unsubscribe from any cleared session automatically #14670

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

adri09070
Copy link
Collaborator

When a debug session is cleared, its process becomes nil so we can't get information from this process anymore.
Also, it means any subscribed debugger shouldn't be able to perform any action on the debug session anymore. That's why, a debugger that has a cleared debug session should unsubscribe from the debug session and from the SystemAnnouncer (it is subscribed to the SystemAnnouncer to get notified when a method has been compiled/recompiled).

For now, we don't have a mechanism that does that automatically. All debuggers should call their method #clear, which is annoying, especially in tests. Because if someone instanciates a debugger in a test but doesn't know that they should ensure the method #clear is called, then some errors (like this one: pharo-spec/NewTools#579) might happen because the debugger executes code due to subscriptions that should have been cancelled, causing some messages to be sent to a nil process.

This PR introduces an event triggered when a session is cleared so that all subscribers can unsubscribe from whatever they should unsubscribe from

…at all subscribers can unsubscribe from any cleared session automatically
@jecisc
Copy link
Member

jecisc commented Sep 15, 2023

About the CI: If tonel tests are broken it's not related. It's because we need to update Tonel version in Iceberg (that loads the tests) and Pharo (that loads the core) and for now only iceberg was updated and it breaks the new tonel tests.

@jecisc
Copy link
Member

jecisc commented Sep 15, 2023

Old failing tests are related to Tonel so this is ok to merge

@jecisc jecisc merged commit fcc1e72 into pharo-project:Pharo12 Sep 15, 2023
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