Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Issue 193693002: android: Pass (non-generated) .java files via a gyp filelist to javac.py (Closed)

Created:
6 years, 9 months ago by Nico
Modified:
6 years, 9 months ago
Reviewers:
cjhopman
CC:
chromium-reviews, klundberg+watch_chromium.org, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org
Visibility:
Public.

Description

android: Pass (non-generated) .java files via a gyp filelist to javac.py Before this CL, the javac action rules called `find javadir -name "*.java"` to compute the action's inputs, and passed javadir to javac.py. The script then again looked for all .java files in that directory. One issue with that approach is that if a java file gets removed, the javac.py action didn't get executed again since actions are only run if their commandline changes or an input file is newer than an output file – a disappearing input doesn't mark an action dirty. (As workaround, the md5 hash of all .java files is currently passed in an --ignore parameter, so removal of a java file will lead to a changing commandline, which _will_ cause a rebuild.) After this CL, the result of `find javadir -name "*.java"` is written to a gyp filelist (see https://codereview.chromium.org/27418008/), and the filelist is passed to javac.py. gyp writes filelists exactly if their contents would change, so removal of java file will change the mtime of the filelist, which will cause a rebuild. Another advantage is that the list of java files is computed in only one place. This CL doesn't yet remove the md5 hack, but it makes it possible to do so in a follow-up change. (This approach doesn't work for generated java files, because these might not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in use for generated files. The dependency handling of generated java files is done through stamp files, so the md5 hack isn't needed for them.) No intended behavior change. BUG=177552 R=cjhopman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256667

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : gen #

Total comments: 2

Patch Set 4 : urgh #

Patch Set 5 : addsrc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -17 lines) Patch
M build/android/gyp/javac.py View 1 2 2 chunks +6 lines, -3 lines 0 comments Download
M build/java.gypi View 1 2 2 chunks +4 lines, -7 lines 0 comments Download
M build/java_apk.gypi View 1 2 3 4 2 chunks +16 lines, -7 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Nico
6 years, 9 months ago (2014-03-11 01:05:57 UTC) #1
cjhopman
This is much better. Thanks, lgtm. We should be doing this in a bunch of ...
6 years, 9 months ago (2014-03-11 01:35:56 UTC) #2
Nico
Thanks! https://codereview.chromium.org/193693002/diff/30001/build/java_apk.gypi File build/java_apk.gypi (right): https://codereview.chromium.org/193693002/diff/30001/build/java_apk.gypi#newcode522 build/java_apk.gypi:522: 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java"))', I ...
6 years, 9 months ago (2014-03-11 01:41:59 UTC) #3
cjhopman
On 2014/03/11 01:41:59, Nico wrote: > Thanks! > > https://codereview.chromium.org/193693002/diff/30001/build/java_apk.gypi > File build/java_apk.gypi (right): > ...
6 years, 9 months ago (2014-03-11 01:49:28 UTC) #4
Nico
Committed patchset #4 manually as r256097 (tree was closed).
6 years, 9 months ago (2014-03-11 02:17:19 UTC) #5
Nico
I'm giving this another try. The diff between patch set 4 and 5 shows what ...
6 years, 9 months ago (2014-03-12 21:50:14 UTC) #6
Nico
6 years, 9 months ago (2014-03-12 22:01:00 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 manually as r256667 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698