[Android build] Javac error prints enormous command line |
|||
Issue descriptionWhen a compilation error occurs running javac over the Android java sources, it prints an enormous command line that appears to include every .java file in the source tree. I'm attaching a sample. - This is too long to be useful or human readable - It doesn't really tell you which file had the error (the actual error messages do), and makes it harder to find the actual errors printed - It causes my emacs to choke when it tries to font-lock the line (I can try to fix that by setting some limits) Maybe we can only print the first N characters of the command line for failed javac commands? CCing agrieve since they have landed patches to javac.py recently.
,
Oct 4 2017
Ninja already prints a command you can run to repro the error, so I think it'd be fine to not also print the underlying command-line. Looks like javac supports response files (passing args via @file-with-args), so that's probably the easiest way to fix this.
,
Jan 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc084a8b5afa3744a74927344e304c02ae54189f commit bc084a8b5afa3744a74927344e304c02ae54189f Author: Eric Stevenson <estevenson@chromium.org> Date: Fri Jan 19 00:48:08 2018 Android: Shorten javac command line with response files. This makes errors more readable and easier to debug. Bug: 771347 Change-Id: I4203e1fb4c9dbe76b58928369d6fc373590f6980 Reviewed-on: https://chromium-review.googlesource.com/874951 Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: Eric Stevenson <estevenson@chromium.org> Cr-Commit-Position: refs/heads/master@{#530369} [modify] https://crrev.com/bc084a8b5afa3744a74927344e304c02ae54189f/build/android/gyp/javac.py
,
Jan 19 2018
The ninja command line is still large ish for certain targets (chrome_java) due to srcjars being listed but for the most part the output is pretty readable now.
,
Jan 19 2018
,
Jan 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da00d557f2525a0cdf79b34d2951e66350dba249 commit da00d557f2525a0cdf79b34d2951e66350dba249 Author: Andrew Grieve <agrieve@chromium.org> Date: Tue Jan 30 18:02:09 2018 Android: Don't use response file for javac.py's classpath It's sometimes quite useful when debugging build failures to be able to see the classpath. Bug: 771347 Change-Id: Ic378b969e25f93d1325663c832fc76583ca15744 Reviewed-on: https://chromium-review.googlesource.com/893518 Reviewed-by: Eric Stevenson <estevenson@chromium.org> Commit-Queue: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#532941} [modify] https://crrev.com/da00d557f2525a0cdf79b34d2951e66350dba249/build/android/gyp/javac.py |
|||
►
Sign in to add a comment |
|||
Comment 1 by mfo...@chromium.org
, Oct 4 2017