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

Issue 2095913003: 🎊 Have build_config targets depend only on other build_config targets (Closed)

Created:
4 years, 6 months ago by agrieve
Modified:
4 years, 5 months ago
Reviewers:
brettw
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, Peter Beverloo, jam, darin-cc_chromium.org, mikecase+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, jbudorick+watch_chromium.org, jochen+watch_chromium.org, pkotwicz
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Have build_config targets depend only on other build_config targets This works by having android target names follow a naming convention. If a target name matches, then it is assumed to have a .build_config file. gn gen will raise an error if it doesn't. Likewise, if a target name does not match the filters, but does create a .build_config file, gn gen will fail on an assert. This change adds a bunch of naming-convention exceptions, which will be addressed in subsequent commits. Finally, why make this change? This allows all .build_config targets to be generated in just a few seconds, which will allow fast generation of build.gradle files for Android Studio integration. BUG=620034 Committed: https://crrev.com/1029ca88161324eff7a62b1e2eecc84d5acf0f6c Cr-Commit-Position: refs/heads/master@{#402934}

Patch Set 1 #

Patch Set 2 : add cronet targets #

Patch Set 3 : fix chromecast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -54 lines) Patch
M build/android/gyp/write_build_config.py View 2 chunks +3 lines, -12 lines 0 comments Download
M build/config/android/internal_rules.gni View 1 2 9 chunks +114 lines, -19 lines 0 comments Download
M build/config/android/rules.gni View 10 chunks +33 lines, -16 lines 0 comments Download
M chromecast/browser/android/BUILD.gn View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M content/shell/android/BUILD.gn View 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (13 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2095913003/1
4 years, 6 months ago (2016-06-24 13:24:01 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/86637)
4 years, 6 months ago (2016-06-24 13:39:28 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2095913003/20001
4 years, 6 months ago (2016-06-24 14:43:09 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/86665)
4 years, 6 months ago (2016-06-24 14:59:21 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2095913003/40001
4 years, 6 months ago (2016-06-24 17:29:21 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-24 18:25:35 UTC) #12
agrieve
On 2016/06/24 18:25:35, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 6 months ago (2016-06-24 19:38:31 UTC) #15
agrieve
On 2016/06/24 19:38:31, agrieve wrote: > On 2016/06/24 18:25:35, commit-bot: I haz the power wrote: ...
4 years, 6 months ago (2016-06-24 19:39:30 UTC) #17
agrieve
On 2016/06/24 19:39:30, agrieve wrote: > On 2016/06/24 19:38:31, agrieve wrote: > > On 2016/06/24 ...
4 years, 5 months ago (2016-06-28 14:51:48 UTC) #19
brettw
lgtm
4 years, 5 months ago (2016-06-29 17:44:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2095913003/40001
4 years, 5 months ago (2016-06-29 19:46:55 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-06-29 21:08:49 UTC) #24
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 21:09:05 UTC) #25
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/1029ca88161324eff7a62b1e2eecc84d5acf0f6c Cr-Commit-Position: refs/heads/master@{#402934}
4 years, 5 months ago (2016-06-29 21:10:26 UTC) #27
Pete Williamson
4 years, 5 months ago (2016-06-29 22:09:17 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2110943002/ by petewil@chromium.org.

The reason for reverting is: Sheriff: reverting on suspicion of breaking the
android build.

It looks like the apk packaging step fails when a required component is not
found. This change looked like a likely culprit since it changes the naming
conventions, and the problem was file not found.

Link to failed build here:
https://build.chromium.org/p/chromium/builders/Android/builds/58342

Relevant section of build logs here:
FAILED: gen/android_webview/system_webview_apk__create_incremental__package.d
gen/android_webview/system_webview_apk/system_webview_apk.apk_intermediates_incremental.unfinished.apk

python ../../build/android/gyp/apkbuilder.py --depfile
gen/android_webview/system_webview_apk__create_incremental__package.d
--resource-apk=gen/android_webview/system_webview_apk/system_webview_apk.apk_intermediates_incremental.ap_
--output-apk=gen/android_webview/system_webview_apk/system_webview_apk.apk_intermediates_incremental.unfinished.apk
--assets=@FileArg\(gen/android_webview/system_webview_apk.build_config:assets\)
--uncompressed-assets=@FileArg\(gen/android_webview/system_webview_apk.build_config:uncompressed_assets\)
--dex-file=gen/build/android/incremental_install/bootstrap.dex
--android-abi=armeabi-v7a
--native-lib-placeholders=\[\"libfix.crbug.384638.so\"\]
Traceback (most recent call last):
  File "../../build/android/gyp/apkbuilder.py", line 311, in <module>
    main(sys.argv[1:])
  File "../../build/android/gyp/apkbuilder.py", line 307, in main
    depfile_deps=depfile_deps)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py",
line 527, in CallAndWriteDepfileIfStale
    pass_changes=True)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 63, in CallAndRecordIfStale
    new_metadata.AddFile(path, _Md5ForPath(path))
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 381, in _Md5ForPath
    _UpdateMd5ForFile(md5, path)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 362, in _UpdateMd5ForFile
    with open(path, 'rb') as infile:
IOError: [Errno 2] No such file or directory: u'snapshot_blob.bin'
[34308/48394] ACTION
//android_webview/test:android_webview_apk__create_incremental__package(//build/toolchain/android:arm)
FAILED:
gen/android_webview/test/android_webview_apk__create_incremental__package.d
gen/android_webview/test/android_webview_apk/android_webview_apk.apk_intermediates_incremental.unfinished.apk

python ../../build/android/gyp/apkbuilder.py --depfile
gen/android_webview/test/android_webview_apk__create_incremental__package.d
--resource-apk=gen/android_webview/test/android_webview_apk/android_webview_apk.apk_intermediates_incremental.ap_
--output-apk=gen/android_webview/test/android_webview_apk/android_webview_apk.apk_intermediates_incremental.unfinished.apk
--assets=@FileArg\(gen/android_webview/test/android_webview_apk.build_config:assets\)
--uncompressed-assets=@FileArg\(gen/android_webview/test/android_webview_apk.build_config:uncompressed_assets\)
--dex-file=gen/build/android/incremental_install/bootstrap.dex
--android-abi=armeabi-v7a
--native-lib-placeholders=\[\"libfix.crbug.384638.so\"\]
Traceback (most recent call last):
  File "../../build/android/gyp/apkbuilder.py", line 311, in <module>
    main(sys.argv[1:])
  File "../../build/android/gyp/apkbuilder.py", line 307, in main
    depfile_deps=depfile_deps)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py",
line 527, in CallAndWriteDepfileIfStale
    pass_changes=True)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 63, in CallAndRecordIfStale
    new_metadata.AddFile(path, _Md5ForPath(path))
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 381, in _Md5ForPath
    _UpdateMd5ForFile(md5, path)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 362, in _UpdateMd5ForFile
    with open(path, 'rb') as infile:
IOError: [Errno 2] No such file or directory: u'snapshot_blob.bin'.

Powered by Google App Engine
This is Rietveld 408576698