precompilation: prevent accidental or pasted keystroke triggers during monitoring#61524
Open
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
Open
precompilation: prevent accidental or pasted keystroke triggers during monitoring#61524IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
Conversation
Drain any pre-existing input from stdin (e.g. pasted or pre-typed text) before entering the precompilation key listener, and replay it back into stdin on exit so it is not lost. Additionally, the `i` key (send profiling signal) now requires Enter to confirm, matching the existing `c` (cancel) behavior. This prevents a single accidental keypress from triggering a noisy profiling dump. Internally, the separate `cancel_confirming`/`cancel_confirm_deadline` fields are replaced with a general `confirming::Symbol` and single `confirm_deadline`, making it easy to add confirmable actions. Fixes JuliaLang#61520 Co-Authored-By: Claude <claude@users.noreply.github.com>
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.
Fixes #61520
@topolarity from some quick testing this fixes the issue for me. Can you try it out?
If I paste in
I get
i.e. none of the pasted chars are consumed by the monitor
And pressing
inow requires confirmation, likec.Developed with claude:
Drain any pre-existing input from stdin (e.g. pasted or pre-typed text) before entering the precompilation key listener, and replay it back into stdin on exit so it is not lost.
Additionally, the
ikey (send profiling signal) now requires Enter to confirm, matching the existingc(cancel) behavior. This prevents a single accidental keypress from triggering a noisy profiling dump.Internally, the separate
cancel_confirming/cancel_confirm_deadlinefields are replaced with a generalconfirming::Symboland singleconfirm_deadline, making it easy to add confirmable actions.