aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/java/io
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-12-07 01:33:23 -0800
committerJake Petroules <jake.petroules@qt.io>2016-12-07 22:55:09 +0000
commit8cd0f9be320c821d1e54b6b52afea0695757b536 (patch)
tree913369d1b823021b29e5a7f5dad766923b5ed4a4 /share/qbs/modules/java/io
parent28af1e508aee74f90f718a082fe4095910e5a731 (diff)
Downgrade error message from JavaCompilerScanner to a warning
This is not actually fatal, as Qbs collects dependency information both from the TreePathScanner API *and* the output files the compilation process writes to. Instead, downgrade it to a warning and also point users to the bug report. This fixes a regression from 1.5.x. Adds an XFAIL'ing autotest. Task-number: QBS-1069 Change-Id: I30e5f5d0d1554bf5078509768fdad12f20922319 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/java/io')
-rw-r--r--share/qbs/modules/java/io/qt/qbs/tools/utils/JavaCompilerScanner.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/share/qbs/modules/java/io/qt/qbs/tools/utils/JavaCompilerScanner.java b/share/qbs/modules/java/io/qt/qbs/tools/utils/JavaCompilerScanner.java
index 368f5519e..1be804ee5 100644
--- a/share/qbs/modules/java/io/qt/qbs/tools/utils/JavaCompilerScanner.java
+++ b/share/qbs/modules/java/io/qt/qbs/tools/utils/JavaCompilerScanner.java
@@ -156,11 +156,18 @@ public class JavaCompilerScanner {
Collections.sort(parsedOutputFilePathsArray);
ArrayList<String> compilationOutputFilePathsArray = new ArrayList<String>(compilationOutputFilePaths);
Collections.sort(compilationOutputFilePathsArray);
+ compilationOutputFilePaths.removeAll(parsedOutputFilePaths);
+ ArrayList<String> differenceArray = new ArrayList<String>(compilationOutputFilePaths);
+ Collections.sort(differenceArray);
- throw new RuntimeException("The set of output files determined by source code parsing:\n\n"
+ System.err.println("The set of output files determined by source code parsing:\n\n"
+ join("\n", parsedOutputFilePathsArray) + "\n\n"
- + "is missing some files that would be produced by the compiler:\n\n"
- + join("\n", compilationOutputFilePathsArray) + "\n");
+ + "is missing some files from the list that would be produced by the compiler:\n\n"
+ + join("\n", compilationOutputFilePathsArray) + "\n\n"
+ + "The missing files are:\n\n"
+ + join("\n", differenceArray) + "\n\n"
+ + "Compilation will still continue, though a build error *might* appear later;\n"
+ + "please check the bug report at https://bugreports.qt.io/browse/QBS-1069\n");
}
return !parsedOutputFilePaths.isEmpty() ? 0 : 1;