Status Update
Comments
rp...@google.com <rp...@google.com>
pa...@google.com <pa...@google.com>
tn...@google.com <tn...@google.com>
pa...@google.com <pa...@google.com> #2
It looks like LintCliClient
provides a function LintCliClient.sortResults()
for sorting its definiteIncidents
(not provisionalIncidents
, and not partialResults
), and this ends up being called after partial results are serialized to disk, anyway (in the analysis phase). Perhaps the call to this function should be removed, and instead sorting could occur in LintCliClient.storeState(project)
(definite, provisional, partial) and LintCliClient.performReporting()
(just definite).
I guess XmlWriter.writePartialResults
needs to iterate over the keys (Issues) in order, and XmlWriter.writeLintMap
needs to iterate over the keys (Strings) in order.
tn...@google.com <tn...@google.com> #3
Paul, do you want to grab this? I saw you made it a P1 without assigning it to yourself so I grabbed it on the shuttle right before the 4th of July break but it looks like you've done some investigation already. I reached the same conclusions - the sort call in LintCliClient#run happens to late and it should probably be moved up (and yes, done in store results, as long as it's also done for non-partial clients, such as g3).
The other thing I was thinking is that in unit tests, we do a lot of "normalization" (via TestLintClient overrides), to ensure that tests are stable across platforms. For example, we replace File.separator with /, and \r\n with \n in strings, such that Windows and Linux+OSX have the same expected output. I wonder if we should consider taking some of this out now (in particular, the things that show up in intermediate results) to help have more test coverage for the stability of these artifacts.
pa...@google.com <pa...@google.com>
an...@google.com <an...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug | 2024.1.3 Canary 2
- Android Gradle Plugin 8.7.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
DESCRIBE THE ISSUE IN DETAIL:
Lint intermediate files is breaking gradle remote cache because the file ordering in
build/intermediates/lint_partial_results/debug/lintAnalyzeDebug/out/lint-definite.xml
isn't deterministic (Linux vs MacOS). We noticed it on theIconLocation
lint rule.STEPS TO REPRODUCE:
IconLocation
rulelint-definite.xml
frombuild/intermediates/lint_partial_results/debug/lintAnalyzeDebug/out
. In our experience the 2 warnings are swapped.FILE CONTENT ON MAC
FILE CONTENT ON LINUS
RESULT
This break gradle remote build cache for CI vs Mac scenario.
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.