Expected behaviour
I'm using GraalVMNativeImagePlugin and when running sbt graalvm-native-image:packageBin I would like to see progress output while the native-image linker is running similar to when I run native-image directly from the command-line. It would be nice to see this output as soon as it appears
[info] [fastpass:4932] classlist: 19,351.15 ms, 1.18 GB
[info] [fastpass:4932] (cap): 1,183.22 ms, 1.18 GB
[info] [fastpass:4932] setup: 2,821.39 ms, 1.18 GB
...
Actual behaviour
There is no progress output from native-image while sbt graalvm-native-image:packageBin is running, which can take several minutes to complete.
I looked at the implementation it uses Process.!(streams.value)and was surprised this does not produce the expected output. Is it maybe necessary to flush somehow?
|
sys.process.Process(command, targetDirectory) ! log match { |
Information
Expected behaviour
I'm using
GraalVMNativeImagePluginand when runningsbt graalvm-native-image:packageBinI would like to see progress output while the native-image linker is running similar to when I runnative-imagedirectly from the command-line. It would be nice to see this output as soon as it appearsActual behaviour
There is no progress output from native-image while
sbt graalvm-native-image:packageBinis running, which can take several minutes to complete.I looked at the implementation it uses
Process.!(streams.value)and was surprised this does not produce the expected output. Is it maybe necessary to flush somehow?sbt-native-packager/src/main/scala/com/typesafe/sbt/packager/graalvmnativeimage/GraalVMNativeImagePlugin.scala
Line 113 in 7c28a1f
Information