Skip to content

precompilation: prevent accidental or pasted keystroke triggers during monitoring#61524

Open
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/precompilepkgs_burst_text
Open

precompilation: prevent accidental or pasted keystroke triggers during monitoring#61524
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/precompilepkgs_burst_text

Conversation

@IanButterworth
Copy link
Copy Markdown
Member

Fixes #61520

@topolarity from some quick testing this fixes the issue for me. Can you try it out?
If I paste in

(@v1.14) pkg> add Example
julia> using Example

I get

(@v1.14) pkg> add Example
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `~/.julia/environments/v1.14/Project.toml`
  [7876af07] + Example v0.5.5
    Updating `~/.julia/environments/v1.14/Manifest.toml`
  [7876af07] + Example v0.5.5
Precompiling project...
Precompiling Example finished.
  1 dependency successfully precompiled in 1 seconds

julia> using Example

i.e. none of the pasted chars are consumed by the monitor

And pressing i now requires confirmation, like c.

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 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.

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>
@IanButterworth IanButterworth marked this pull request as ready for review April 7, 2026 21:12
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.

Profiling signal easily triggered accidentally (via pre-compilation menu)

1 participant