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

More fixes for prompt logger #4075

Merged
merged 8 commits into from
Dec 6, 2024
Merged

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Dec 5, 2024

Fixes #4074

We shouldn't sleep for nonInteractivePromptUpdateIntervalMillis every time readTerminalDims fails, because that means if there's a transient failure it doesn't check again for 60s during which there is no prompt shown

Instead, we always check after promptUpdateIntervalMillis seconds, and but only refresh the prompt if now - lastUpdate > nonInteractivePromptUpdateIntervalMillis

Also we make sure we call writeTerminalDims at least once before we start the Mill background process, rather than relying on the background thread to reach that code path in time

Either of these fixes alone should solve the issue, but might as well do both

@lihaoyi lihaoyi merged commit 46a199e into com-lihaoyi:main Dec 6, 2024
27 checks passed
@lefou lefou added this to the 0.12.4 milestone Dec 6, 2024
jodersky pushed a commit to jodersky/mill that referenced this pull request Jan 14, 2025
Fixes com-lihaoyi#4074

We shouldn't sleep for `nonInteractivePromptUpdateIntervalMillis` every
time `readTerminalDims` fails, because that means if there's a transient
failure it doesn't check again for 60s during which there is no prompt
shown

Instead, we always check after `promptUpdateIntervalMillis` seconds, and
but only refresh the prompt if `now - lastUpdate >
nonInteractivePromptUpdateIntervalMillis`

Also we make sure we call `writeTerminalDims` at least once before we
start the Mill background process, rather than relying on the background
thread to reach that code path in time

Either of these fixes alone should solve the issue, but might as well do
both
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.

Prompt logger disappears after mill clean
2 participants