Repository navigation
A timeout or abort no longer leaves the session quiet or boxing - #2132
Merged
Merged
Conversation
Plot turns messages off (`evaluation.quiet_all`) while it samples its functions, and formatting sets `evaluation.is_boxing`; both were put back only on a normal return. A timeout given to `evaluate` (or an Abort[]) in the middle of a Plot left the session silent for good: the `General::timeout` of that very evaluation was not shown, and no later message either (`1/0` gave ComplexInfinity without Power::infy). `is_boxing` stuck at True also turned TraceEvaluation off. The state is now restored in `finally` in Plot (both the per-point function and the whole of eval_Plot), in format_element, in the TraceEvaluation call hook and in print_out (which turns trace_evaluation off while formatting a Print). Block (dynamic_scoping), Quiet, Check, Get, the iteration and recursion counters already restore their state in `finally`. MATH-419. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
LGTM |
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.
A follow-up to #2093. Plot turns messages off (
evaluation.quiet_all) while it samples its functions, and formatting setsevaluation.is_boxing. Both were put back only on a normal return. A timeout given toevaluate(or anAbort[]) in the middle of a Plot left the session silent for good:is_boxingstuck atTruealso turned TraceEvaluation off for the rest of the session.The state is now restored in
finallyin:eval_Plot, which is now a thin wrapper around_eval_Plot, so the 170-line body is not reindented;format_element;is_boxing);print_out, which turnstrace_evaluationoff while it formats aPrint.Already safe, checked: Block (
dynamic_scoping),Quiet,Check,Get, the iteration and recursion counters,evaluation.options.New test
test_evaluate_timeout_restores_state: a timed-out Plot gives$Abortedand "Timeout reached.", and the next1/0shows its message. It fails on master.🤖 Generated with Claude Code