On Fri, 13 Jan 2023 00:32:36 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
> Hm. I fully agree on the problem description, but not entirely sure about > this solution. In contrast with Erik, I was more thinking along the lines > that the decision to be more quiet could be made by SetupNativeCompilation > itself, based on the number of files it compiled. So if it only compiled a > single c file into a single dll, then it should be quiet. > > With "meta message", I think Erik means that if all tests are suddenly being > quiet, we should compensate by printing a more general high-level message > like "Building NN native tests". I think such a rule is too generic and could easily end up not logging a JDK library or launcher. My idea with having SetupTestCompilation control the log level for tests was that it could add a single "meta" log message saying something like "Building NN native tests", which would then replace all of those hidden messages that would otherwise have been printed by SetupNativeCompilation. At least in my mind, that divides the responsibility better with less risk of hiding future useful log messages. > comes out whether anything compiled or not, which nobody wants. > Unless you can pass status back from this 'foreach' loop. I guess I'm stuck. Yes, getting this right is more tricky. We also want the message to be printed before the compilation starts. To do this, we need to create a rule with a dummy (but real) target that depends on all the source files found by SetupTestCompilation, prints the message and then touches the target file. It's possible we need to some more tweaking to make it work well, not sure. ------------- PR: https://git.openjdk.org/jdk/pull/11930