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

Issue 2308313003: gn: Generalize process_version() and move it to build/util (Closed)

Created:
4 years, 3 months ago by Raphael Kubo da Costa (rakuco)
Modified:
4 years, 3 months ago
CC:
alokp+watch_chromium.org, anandc+watch-blimp_chromium.org, android-webview-reviews_chromium.org, caitkp+watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, chromoting-reviews_chromium.org, dtrainor+watch-blimp_chromium.org, eme-reviews_chromium.org, extensions-reviews_chromium.org, feature-media-reviews_chromium.org, gab+watch_chromium.org, gcasto+watch-blimp_chromium.org, grt+watch_chromium.org, halliwell+watch_chromium.org, jessicag+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lcwu+watch_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, Michael Moss, nyquist+watch-blimp_chromium.org, pennymac+watch_chromium.org, shaktisahu+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, wfh+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

There is nothing really chrome-specific in the process_version() template, and if we stop always passing some files in chrome/ on every invocation it is possible to generalize it and move it to build/util instead (and fix some layering violation comments along the way). Compared to its previous incarnation, process_version() no longer passes LASTCHANGE, BRANDING and VERSION automatically to version.py. This makes it easier for callers to specify their own |sources| with values that may override those set in those 3 files. A new wrapper, process_version_rc_template(), was introduced to cater for callers (generally Windows ones) who need to process a .rc.version file that requires the values from LASTCHANGE, BRANDING and VERSION. It always passes those 3 files to process_version() before any optional additional |sources|, and |template_file| defaults to chrome_version.rc.version. Since this template depends on files from //chrome, it lives in the newly-added //chrome/process_version_rc_template.gni. R=dpranke@chromium.org,brettw@chromium.org Committed: https://crrev.com/cf276fc41653b2830a5ec796d4db09b199754677 Cr-Commit-Position: refs/heads/master@{#418514}

Patch Set 1 #

Patch Set 2 : Fix chromecast #

Total comments: 1

Patch Set 3 : Move process_version_rc_template() to chrome// #

Total comments: 1

Patch Set 4 : Move branding_file_path to chrome/process_version_rc_template.gni #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -240 lines) Patch
M android_webview/common/BUILD.gn View 1 chunk +4 lines, -1 line 0 comments Download
M blimp/common/BUILD.gn View 2 chunks +4 lines, -1 line 0 comments Download
A + build/util/process_version.gni View 1 2 8 chunks +8 lines, -36 lines 0 comments Download
M build/util/version.gni View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/BUILD.gn View 1 2 3 chunks +5 lines, -9 lines 0 comments Download
M chrome/android/BUILD.gn View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M chrome/app/version_assembly/BUILD.gn View 3 chunks +7 lines, -1 line 0 comments Download
M chrome/chrome_watcher/BUILD.gn View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/installer/gcapi/BUILD.gn View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/installer/linux/BUILD.gn View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M chrome/installer/mini_installer/BUILD.gn View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/installer/setup/BUILD.gn View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/process_version_rc_template.gni View 1 2 3 1 chunk +65 lines, -0 lines 0 comments Download
D chrome/version.gni View 1 chunk +0 lines, -153 lines 0 comments Download
M chrome_elf/BUILD.gn View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M chromecast/base/BUILD.gn View 1 2 chunks +4 lines, -1 line 0 comments Download
M chromecast/crypto/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M components/cronet/android/BUILD.gn View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M components/cronet/ios/BUILD.gn View 2 chunks +4 lines, -1 line 0 comments Download
M components/data_reduction_proxy/core/common/BUILD.gn View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M components/version_info/BUILD.gn View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M extensions/shell/BUILD.gn View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M ios/crnet/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M media/cdm/ppapi/BUILD.gn View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M remoting/build/config/remoting_build.gni View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M remoting/host/BUILD.gn View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M third_party/widevine/cdm/BUILD.gn View 1 2 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (13 generated)
Raphael Kubo da Costa (rakuco)
Brett/Dirk: please take a look at this one. That's the version I mentioned in https://codereview.chromium.org/2308583002/ ...
4 years, 3 months ago (2016-09-05 10:03:43 UTC) #2
Dirk Pranke
This looks pretty good to me, but brettw@ knows this stuff better and should ultimate ...
4 years, 3 months ago (2016-09-06 01:35:25 UTC) #3
brettw
https://codereview.chromium.org/2308313003/diff/20001/build/util/process_version.gni File build/util/process_version.gni (right): https://codereview.chromium.org/2308313003/diff/20001/build/util/process_version.gni#newcode162 build/util/process_version.gni:162: _template_file = "//chrome/app/chrome_version.rc.version" Since this depends on files from ...
4 years, 3 months ago (2016-09-06 22:52:31 UTC) #4
Raphael Kubo da Costa (rakuco)
Patch updated: I've moved process_version_rc_template() to //chrome/process_version_rc_template.gni and I've rebased the commit on top of ...
4 years, 3 months ago (2016-09-08 14:36:02 UTC) #6
Raphael Kubo da Costa (rakuco)
ping
4 years, 3 months ago (2016-09-13 10:01:29 UTC) #7
brettw
LGTM with one change (don't need to get another review). Thanks! https://codereview.chromium.org/2308313003/diff/40001/build/config/chrome_build.gni File build/config/chrome_build.gni (right): ...
4 years, 3 months ago (2016-09-13 17:59:15 UTC) #8
Raphael Kubo da Costa (rakuco)
+phajdan.jr for chrome/installer/linux +ddorwin, xhwang for third_party/widevine/cdm I've updated the patch and moved |branding_file_path| to ...
4 years, 3 months ago (2016-09-13 18:48:52 UTC) #11
Paweł Hajdan Jr.
chrome/installer/linux LGTM
4 years, 3 months ago (2016-09-13 19:02:15 UTC) #12
ddorwin
third_party/widevine/cdm/BUILD.gn and media/cdm/ppapi/BUILD.gn LGTM
4 years, 3 months ago (2016-09-13 19:56:01 UTC) #13
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/2308313003/60001
4 years, 3 months ago (2016-09-13 21:28:44 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win10_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win10_chromium_x64_rel_ng/builds/306)
4 years, 3 months ago (2016-09-13 21:54:51 UTC) #18
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/2308313003/60001
4 years, 3 months ago (2016-09-14 08:28:29 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win10_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win10_chromium_x64_rel_ng/builds/309)
4 years, 3 months ago (2016-09-14 08:48:48 UTC) #22
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/2308313003/60001
4 years, 3 months ago (2016-09-14 08:50:08 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-14 08:54:43 UTC) #27
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/cf276fc41653b2830a5ec796d4db09b199754677 Cr-Commit-Position: refs/heads/master@{#418514}
4 years, 3 months ago (2016-09-14 08:57:00 UTC) #29
Yuta Kitamura
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2338093003/ by yutak@chromium.org. ...
4 years, 3 months ago (2016-09-14 09:46:39 UTC) #30
brettw
4 years, 3 months ago (2016-09-14 17:03:09 UTC) #31
Message was sent while issue was closed.
Please reach out if you're having trouble understanding this error, since it
seems to be on the branded Chrome build only.

Powered by Google App Engine
This is Rietveld 408576698