-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
[Feature Request] Better output for mill show #2880
Comments
I think this is probably unlikely to be supported. If you really want the raw paths from Mill, you can write your own target We should fix everything else you brought up though. |
Prefixing of w.r.t. mill/runner/src/mill/runner/MillMain.scala Line 192 in bc84d5b
stdout stream?
|
Yes, just run: $ rm -r ~/.mill
$ mill -i -j0 show anything > stdout.txt
1 targets failed
show Cannot resolve anything. Try `mill resolve _` to see what's available.
$ cat stdout.txt
Preparing Java 21 runtime; this may take a minute or two ... Also some additional version information: $ mill --version
Mill Build Tool version 0.11.5
Java version: 21, vendor: N/A, runtime: /nix/store/q2vb58zhpsyhs3zq3zgyd3arv1m7b486-openjdk-21+35/lib/openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "Linux", version: 6.5.9-zen2-1-zen, arch: amd64 |
Thanks! |
Currently our team is using mill to run a large number of build tasks, with each one returning the final binary path wrapped inside the
PathRef
type. These binaries are used in the final main task. But because the amount of these binaries are too large, so we decide to usemill -i -j0 show _.<our_task_name>
to compile the build tasks simultaneously and use the return JSON to index those file, then package them together for distribution.And here are some problems we encounter during the
mill show
and parsing process:-j0
can help us build all the tasks using all cores, but it will also add a prefix#[<number>]
to the stdout, and cause the output JSON to be invalid. Now, to get the valid JSON, we can only use regex expression to trim the prefix.mill -i resolve _ > /dev/null
to do a warm-up.mill show
on thePathRef
type will return a string with path and other metadata, so we need split the string with ':' and get the last segment.Here is some of my idea for improving the mill show command:
-o
) to letmill show
write the JSON output to a file?PathRef
output path only?The text was updated successfully, but these errors were encountered: