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

Issue 1958783003: GN: Prefer toplevel targets for phony names. (Closed)

Created:
4 years, 7 months ago by brettw
Modified:
4 years, 7 months ago
Reviewers:
scottmg
CC:
chromium-reviews, Dirk Pranke, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GN: Prefer toplevel targets for phony names. This rewrites the phony target generation in GN to be more scalable. Previously there were two loops and it ahd a lot of conditions in the loop for when to generate certain names. This was subtle and difficult to maintain as we added more variants. The new scheme has many passes, each lower in priority, that generate rules only if the name hasn't already been taken by something else. This is much easier to reason about and enhance. The new code also accounts for collisions among all output files (previously only some things checked for output file collisions). In this new scheme we now allow toplevel targets like "//:foo" to claim the name "foo" even when there are multiple things called "foo", as long as none of them are executables or duplicate an output name. This results in some minor and not-material changes in ordering and formatting in the output. This now uses PathOutput for all file names (previously the "all" rule just wrote the names directly, which could miss some escaping). As a result, some paths have changed slightly but not in meaningful ways. Doing basic sorting of the files before and after and removing " ./" gives the same set of rules in the current build before and after this change. Committed: https://crrev.com/66bbbab9be0a7ecf97c124b24d2be4bc7975a0a5 Cr-Commit-Position: refs/heads/master@{#392491}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : Review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -160 lines) Patch
M tools/gn/ninja_build_writer.h View 1 chunk +1 line, -6 lines 0 comments Download
M tools/gn/ninja_build_writer.cc View 1 2 3 4 5 6 chunks +146 lines, -152 lines 0 comments Download
M tools/gn/ninja_build_writer_unittest.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
brettw
4 years, 7 months ago (2016-05-09 20:41:39 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1958783003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1958783003/60001
4 years, 7 months ago (2016-05-09 20:42:09 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/210514)
4 years, 7 months ago (2016-05-09 21:07:01 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1958783003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1958783003/80001
4 years, 7 months ago (2016-05-09 21:15:16 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-09 21:58:26 UTC) #13
scottmg
I'm vaguely worried about a bot building something and then having that thing change because ...
4 years, 7 months ago (2016-05-09 23:31:53 UTC) #14
brettw
Review comments
4 years, 7 months ago (2016-05-09 23:50:30 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1958783003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1958783003/100001
4 years, 7 months ago (2016-05-09 23:50:56 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-05-10 00:33:19 UTC) #20
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 00:35:23 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/66bbbab9be0a7ecf97c124b24d2be4bc7975a0a5
Cr-Commit-Position: refs/heads/master@{#392491}

Powered by Google App Engine
This is Rietveld 408576698