Restore dependent reload list when an evaluation is rolled back - #704
Merged
Merged
Conversation
xdelaruelle
force-pushed
the
depre-restore-settings
branch
from
September 20, 2026 13:21
a396bd7 to
4e72f16
Compare
When the unload of a module triggers the unload phase of several dependent modules and one of them fails, the evaluation is rolled back but the dependent reload list keeps the modules queued before the failure. Their properties were never saved as the unload phase stopped before reaching them. If the sequence then continues, like a switch with switch_unload absent from abort_on_error, the reload phase looks up these missing properties and raises an internal Tcl error. Save the dependent reload list and the saved properties of reloading modules along with the other settings pushed before an evaluation, so a rollback restores them to their state prior the failed evaluation. Dependents restored in the loaded environment by this rollback are thus not reloaded anymore. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Adrien Cotte <adrien.cotte@asplus.fr> Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
xdelaruelle
force-pushed
the
depre-restore-settings
branch
from
September 21, 2026 05:24
4e72f16 to
41e41dc
Compare
adrien-cotte
approved these changes
Sep 21, 2026
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.
When the unload of a module triggers the unload phase of several dependent modules and one of them fails, the evaluation is rolled back but the dependent reload list keeps the modules queued before the failure. Their properties were never saved as the unload phase stopped before reaching them. If the sequence then continues, like a
switchwithswitch_unloadabsent fromabort_on_error, the reload phase looks up these missing properties and raises an internal Tcl error:Save the dependent reload list and the saved properties of reloading modules along with the other settings pushed before an evaluation, so a rollback restores them to their state prior the failed evaluation. Dependents restored in the loaded environment by this rollback are thus not reloaded anymore, consistently with what already happens when a single dependent fails to unload.
Fix authored by Adrien Cotte. A new test case in
616-abort_on_error-switch.expreproduces the error without the fix, and a NEWS entry is added.