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

Ensure prompt shows inside exclusive command evaluations #3690

Merged
merged 13 commits into from
Oct 8, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Oct 8, 2024

Fixes #3677

  • We need to introduce a Logger#withPromptUnpaused API, called internally within EvaluatorImpl, to make sure we turn on the prompt by default even when called within a exclusive=true command which turned it off

  • We cannot use SystemStreams.original, because they do not go through Mills input redirection and so may arrive slightly out of order

  • def run in build.mill has to be a Task.Command(exclusive = true) for testing stuff using mill dist.run to work properly

  • I moved some of the gnarlier paused/pausedNoticed/stopped state from PromptLogger to an encapsulated PromperLogger#RunningState class where we can control the mutation and ensure it is done correctly

  • Moved the periodic calling of readTerminalDims out of the synchronized block, only the subsequent storing of the data in memory needs to be synchronized

@lihaoyi lihaoyi marked this pull request as ready for review October 8, 2024 17:21
@lihaoyi lihaoyi merged commit d3afbf6 into com-lihaoyi:main Oct 8, 2024
24 checks passed
@lefou lefou added this to the 0.12.0 milestone Oct 8, 2024
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.

New prompt logger sometimes doesn't work properly with show
2 participants