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

Put back withPromptPaused, but make it private[mill] #3635

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Oct 1, 2024

Turns out we still need it for console and repl commands in order to disable the prompt auto updater thread. But we can limit its use to only within EvaluatorCore for every exclusive command, rather than letting it be used in any random user-land task

Also refactors it such that exclusive = true commands use SystemStreams.original by default, allowing def repl and def console to work without overriding the system streams themselves

Tested manually

$ ./mill -i dist.launcher && (cd example/scalalib/basic/1-simple  && ../../../../out/dist/launcher.dest/run -i path compile sources + console + version)

[2579/2579] ========================================================================= dist.launcher ============================================================================= 2s
[5/57] path
sources
allSources
allSourceFiles
compile
[56/57] console
Welcome to Scala 2.13.11 (OpenJDK 64-Bit Server VM, Java 17.0.6).
Type in expressions for evaluation. Or try :help.

scala> 1 + 1
val res0: Int = 2

scala> :quit
[57/57] version
0.12.0-RC2-65-906911
[57/57] =============================================================== path compile sources + console + version ================================================================ 7s
lihaoyi mill$

@lihaoyi lihaoyi marked this pull request as ready for review October 1, 2024 02:15
@lefou
Copy link
Member

lefou commented Oct 1, 2024

Do we still print rhe task id and the task name before the exclusive task output? This would be especially helpful in case multiple exclusive tasks run sequentially.

@lihaoyi
Copy link
Member Author

lihaoyi commented Oct 1, 2024

@lefou yes, it looks like this:

$ ./mill -i dist.launcher && (cd example/scalalib/basic/1-simple  && ../../../../out/dist/launcher.dest/run -i path compile sources + console + version)

[2579/2579] ========================================================================= dist.launcher ============================================================================= 2s
[5/57] path
sources
allSources
allSourceFiles
compile
[56/57] console
Welcome to Scala 2.13.11 (OpenJDK 64-Bit Server VM, Java 17.0.6).
Type in expressions for evaluation. Or try :help.

scala> 1 + 1
val res0: Int = 2

scala> :quit
[57/57] version
0.12.0-RC2-65-906911
[57/57] =============================================================== path compile sources + console + version ================================================================ 7s
lihaoyi mill$

@lefou
Copy link
Member

lefou commented Oct 1, 2024

Great.

@lihaoyi lihaoyi merged commit 64ba585 into com-lihaoyi:main Oct 1, 2024
24 checks passed
@lefou lefou added this to the 0.12.0-RC3 milestone Oct 1, 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.

2 participants