Skip to content

Commit eacd356

Browse files
committed
MOAR LOGGING
Context: #8681 (comment) For some reason we see `crc641855b07eca6dcc03/GenericHolder_1.java` in the log output, part of `@(_JavaStubFiles)`, but as far as we can tell it *isn't* being compiled. Which makes no sense. My best conjecture is that `@(_JavaBindingSource)` doesn't include everything within `@(_JavaStubFiles)`. Update the `<Javac/>` task to print out the paths of all files that at added to the response file, so that we can see what `javac` is *actually* compiling.
1 parent 8dc95b5 commit eacd356

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Xamarin.Android.Build.Tasks/Tasks/JavaCompileToolTask.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ private void GenerateResponseFile ()
6363
WriteOptionsToResponseFile (sw);
6464
// Include any user .java files
6565
if (JavaSourceFiles != null)
66-
foreach (var file in JavaSourceFiles.Where (p => Path.GetExtension (p.ItemSpec) == ".java"))
67-
sw.WriteLine (string.Format ("\"{0}\"", file.ItemSpec.Replace (@"\", @"\\")));
66+
foreach (var file in JavaSourceFiles.Where (p => Path.GetExtension (p.ItemSpec) == ".java")) {
67+
var path = file.ItemSpec.Replace (@"\", @"\\");
68+
sw.WriteLine (string.Format ("\"{0}\"", path));
69+
Log.LogDebugMessage ($"javac source: {path}");
70+
}
6871

6972
if (string.IsNullOrEmpty (StubSourceDirectory))
7073
return;
@@ -86,8 +89,10 @@ private void GenerateResponseFile ()
8689
// Solution:
8790
// Since '\' is an escape character, we need to escape it.
8891
// [0] http://download.oracle.com/javase/1.4.2/docs/api/java/io/StreamTokenizer.html#quoteChar(int)
92+
var path = file.Replace (@"\", @"\\").Normalize (NormalizationForm.FormC);
8993
sw.WriteLine (string.Format ("\"{0}\"",
90-
file.Replace (@"\", @"\\").Normalize (NormalizationForm.FormC)));
94+
path));
95+
Log.LogDebugMessage ($"javac source: {path}");
9196
}
9297
}
9398
}

0 commit comments

Comments
 (0)