-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add failed tasks count to Mill's progress indicator #4617
base: main
Are you sure you want to change the base?
Conversation
* Add failed tasks count to Mill's progress indicator This change introduces a mechanism to track and display the number of failed tasks during build execution. Key modifications include: - Added `setFailedTasksCount` method to the `Logger` trait - Updated `Execution` to count and report failed tasks - Modified `PromptLogger` to include failed tasks count in the progress indicator - Implemented `setFailedTasksCount` in `MultiLogger` and `PromptLogger` The new feature provides more visibility into build status by showing the number of failed tasks in the progress line, helping users quickly identify build issues.
@lihaoyi solved the issue and provided an integration test just like you wanted, included the debug info just in case to not to take your time for nothing. For people who use windows and search through github to see how to run the integration tests: as one-liner command on powershell works. |
Seems to partially work now! Still hitting some issues: lihaoyi mill$ /Users/lihaoyi/Github/mill/mill-assembly.jar main.test.compile
Mill version SNAPSHOT is different than configured for this directory!
Configured version is 0.12.8-1-46e216-native (/Users/lihaoyi/Github/mill/.config/mill-version)
[1002/1006] testkit.compile
[1002] [info] compiling 1 Scala source to /Users/lihaoyi/Github/mill/out/testkit/compile.dest/classes ...
[1002] [error] -- [E103] Syntax Error: /Users/lihaoyi/Github/mill/testkit/src/mill/testkit/UtestIntegrationTestSuite.scala:24:0
[1002] [error] 24 |breakage
[1002] [error] |^^^^^^^^
[1002] [error] |Illegal start of toplevel definition
[1002] [error] |
[1002] [error] | longer explanation available when compiling with `-explain`
[1002] [error] one error found
[1006/1006] ============================== main.test.compile ==============================
1 tasks failed
testkit.compile Compilation failed
lihaoyi mill$ /Users/lihaoyi/Github/mill/mill-assembly.jar -k main.test.compile
Mill version SNAPSHOT is different than configured for this directory!
Configured version is 0.12.8-1-46e216-native (/Users/lihaoyi/Github/mill/.config/mill-version)
[1002/1006] testkit.compile
[1002] [info] compiling 1 Scala source to /Users/lihaoyi/Github/mill/out/testkit/compile.dest/classes ...
[1002] [error] -- [E103] Syntax Error: /Users/lihaoyi/Github/mill/testkit/src/mill/testkit/UtestIntegrationTestSuite.scala:24:0
[1002] [error] 24 |breakage
[1002] [error] |^^^^^^^^
[1002] [error] |Illegal start of toplevel definition
[1002] [error] |
[1002] [error] | longer explanation available when compiling with `-explain`
[1002] [error] one error found
[1002] [1002] testkit.compile failed
[1004/1006]
[1003/1006]
[1004] [1004] main.test.upstreamCompileOutput failed
[1003] [1003] main.test.transitiveCompileClasspath failed
[1005/1006]
[1005] [1005] main.test.compileClasspath failed
[1006/1006]
[1006] [1006] main.test.compile failed
[1006/1006, 4 failed] ============================== main.test.compile ==============================
1 tasks failed
testkit.compile Compilation failed
|
Ups! That actually has an incredibly easy fix, i will post it with the updated integration test. |
This change improves the accuracy of failed tasks counting in Mill's build execution: - Updated `Execution` to correctly count failed tasks using `asFailing` instead of `asSuccess` - Extended test coverage for failed tasks counting in different scenarios - Added tests for both default and keep-going (-k) modes - Verified that only actual task failures are counted, not skipped tasks - Demonstrated handling of complex dependency structures with task failures
@lihaoyi Should be fixed now, thanks for pointing it out. I forgot to test the skipped tasks. |
I just tried the latest 631fa95, still not seeing the |
Via the integration test and debug info i get, can you share your testing files so i can try with them instead? |
Here's what I'm running to exercise this end-to-end git clean -xdf
./mill dist.installLocal
echo breakage >> main/test/src/mill/TestMain.scala
ci/patch-mill-bootstrap.sh
./mill-assembly.jar main.__.test The final command shows the failure in the logs but not in the prompt lihaoyi mill$ ./mill-assembly.jar main.__.test
Mill version SNAPSHOT is different than configured for this directory!
Configured version is 0.12.8-1-46e216-native (/Users/lihaoyi/Github/mill/.config/mill-version)
[mill-build/build.mill-62/66] compile
[mill-build/build.mill-62] [info] compiling 1 Scala source to /Users/lihaoyi/Github/mill/out/mill-build/mill-build/compile.dest/classes ...
[mill-build/build.mill-62] [info] done compiling
[build.mill-62/66] compile
[build.mill-62] [info] compiling 29 Scala sources to /Users/lihaoyi/Github/mill/out/mill-build/compile.dest/classes ...
[build.mill-62] [warn] -- /Users/lihaoyi/Github/mill/website/package.mill:316:13
[build.mill-62] [warn] 316 │ millLastTag.split('.'),
[build.mill-62] [warn] │ ^
[build.mill-62] [warn] │method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated since 2.13.0: implicit conversions from Array to immutable.IndexedSeq are implemented by copying; use `toIndexedSeq` explicitly if you want to copy, or use the more efficient non-copying ArraySeq.unsafeWrapArray
[build.mill-62] [warn] one warning found
[build.mill-62] [info] done compiling
[2727/2985] main.test.compile
[2727] [info] compiling 4 Scala sources to /Users/lihaoyi/Github/mill/out/main/test/compile.dest/classes ...
[2727] [error] -- [E103] Syntax Error: /Users/lihaoyi/Github/mill/main/test/src/mill/TestMain.scala:6:0
[2727] [error] 6 |breakage
[2727] [error] |^^^^^^^^
[2727] [error] |Illegal start of toplevel definition
[2727] [error] |
[2727] [error] | longer explanation available when compiling with `-explain`
[2727] [error] one error found
[2985/2985] ============================== main.__.test ============================== 26s
1 tasks failed
main.test.compile Compilation failed |
Will check with your method, converted to draft to stop the running time of build to avoid wasting it, will ping you when i solve it |
This change introduces a mechanism to track and display the number of failed tasks during build execution. Key modifications include:
setFailedTasksCount
method to theLogger
traitExecution
to count and report failed tasksPromptLogger
to include failed tasks count in the progress indicatorsetFailedTasksCount
inMultiLogger
andPromptLogger
fixes #4588
The new feature provides more visibility into build status by showing the number of failed tasks in the progress line, helping users quickly identify build issues.
Example output from the integration test: