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

Issue 561273003: Add public deps to GN (Closed)

Created:
6 years, 3 months ago by brettw
Modified:
6 years, 3 months ago
Reviewers:
jamesr
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add public deps to GN. Renamed datadeps to data_deps for consistency. Renamed direct_dependent_configs to public_configs for consistency with the public deps. This is also easier to understand and hopefully will encourage people to do this instead of use all_dependent_configs. Now that there are so many types of deps, added a DepsIterator that allows easy iterating over all of them (or only the linked ones). This simplified some code. This simplified the header checker significantly since it had complicated logic to find direct_dependent_configs and prefer paths with those forwarded. Removed a bunch of weird group special-casing. Groups no longer have their deps copied into the target, but are dependents like everything else. For now, unless you explicitly specify public_deps, all group deps will default to public. I'd like to change this in a future pass. Added a bool return value to the target generator functions that fill values. Since I originally did that, I've started both returning a bool and setting an Err, which makes checking for the error and early-returning easier to remember. I did this because I found yet another case of forgetting to check err, which gives very strange results. Committed: https://crrev.com/c2e821a33bf4ffdf9d325bb0876bd9924284e228 Cr-Commit-Position: refs/heads/master@{#295203}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : merge #

Total comments: 9

Patch Set 5 : review comments, speling #

Patch Set 6 : deps iterator file added #

Patch Set 7 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+754 lines, -863 lines) Patch
M tools/gn/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/action_target_generator.h View 1 chunk +4 lines, -4 lines 0 comments Download
M tools/gn/action_target_generator.cc View 1 2 3 4 4 chunks +25 lines, -31 lines 0 comments Download
M tools/gn/binary_target_generator.h View 1 chunk +5 lines, -5 lines 0 comments Download
M tools/gn/binary_target_generator.cc View 1 2 3 4 5 6 4 chunks +34 lines, -37 lines 0 comments Download
M tools/gn/builder.cc View 1 2 3 4 4 chunks +14 lines, -11 lines 0 comments Download
M tools/gn/builder_unittest.cc View 1 2 3 4 5 6 5 chunks +6 lines, -3 lines 0 comments Download
M tools/gn/command_desc.cc View 1 2 3 4 11 chunks +23 lines, -39 lines 0 comments Download
M tools/gn/command_refs.cc View 1 2 3 4 2 chunks +3 lines, -11 lines 0 comments Download
M tools/gn/config_values_extractors_unittest.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M tools/gn/copy_target_generator.cc View 1 chunk +2 lines, -4 lines 0 comments Download
A tools/gn/deps_iterator.h View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
A tools/gn/deps_iterator.cc View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
M tools/gn/function_toolchain.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/functions.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/functions_target.cc View 1 5 chunks +13 lines, -12 lines 0 comments Download
M tools/gn/gn.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/group_target_generator.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M tools/gn/header_checker.h View 1 1 chunk +8 lines, -21 lines 0 comments Download
M tools/gn/header_checker.cc View 1 2 3 4 5 7 chunks +62 lines, -153 lines 0 comments Download
M tools/gn/header_checker_unittest.cc View 5 chunks +60 lines, -128 lines 0 comments Download
M tools/gn/ninja_action_target_writer.cc View 1 2 3 4 3 chunks +7 lines, -5 lines 0 comments Download
M tools/gn/ninja_action_target_writer_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.cc View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 5 chunks +5 lines, -3 lines 0 comments Download
M tools/gn/ninja_group_target_writer.cc View 1 2 3 4 2 chunks +8 lines, -7 lines 0 comments Download
M tools/gn/ninja_group_target_writer_unittest.cc View 1 chunk +7 lines, -3 lines 0 comments Download
M tools/gn/ninja_target_writer_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M tools/gn/target.h View 1 2 3 4 5 chunks +22 lines, -29 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 4 8 chunks +48 lines, -92 lines 0 comments Download
M tools/gn/target_generator.h View 2 chunks +12 lines, -12 lines 0 comments Download
M tools/gn/target_generator.cc View 1 6 chunks +72 lines, -50 lines 0 comments Download
M tools/gn/target_unittest.cc View 1 2 3 4 5 6 16 chunks +39 lines, -122 lines 0 comments Download
M tools/gn/variables.h View 1 3 chunks +11 lines, -7 lines 0 comments Download
M tools/gn/variables.cc View 1 2 3 4 10 chunks +112 lines, -54 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
brettw
6 years, 3 months ago (2014-09-16 19:52:34 UTC) #2
jamesr
https://codereview.chromium.org/561273003/diff/10031/tools/gn/action_target_generator.cc File tools/gn/action_target_generator.cc (right): https://codereview.chromium.org/561273003/diff/10031/tools/gn/action_target_generator.cc#newcode70 tools/gn/action_target_generator.cc:70: return true; wait, what does 'return true' mean? here ...
6 years, 3 months ago (2014-09-16 20:09:25 UTC) #3
brettw
PTAL https://codereview.chromium.org/561273003/diff/10031/tools/gn/action_target_generator.cc File tools/gn/action_target_generator.cc (right): https://codereview.chromium.org/561273003/diff/10031/tools/gn/action_target_generator.cc#newcode70 tools/gn/action_target_generator.cc:70: return true; Mistake https://codereview.chromium.org/561273003/diff/50001/tools/gn/variables.cc File tools/gn/variables.cc (right): https://codereview.chromium.org/561273003/diff/50001/tools/gn/variables.cc#newcode802 ...
6 years, 3 months ago (2014-09-16 21:01:33 UTC) #4
jamesr
dumping comments from ps4, will start looking at ps5... https://codereview.chromium.org/561273003/diff/50001/tools/gn/action_target_generator.cc File tools/gn/action_target_generator.cc (right): https://codereview.chromium.org/561273003/diff/50001/tools/gn/action_target_generator.cc#newcode70 tools/gn/action_target_generator.cc:70: ...
6 years, 3 months ago (2014-09-16 22:14:24 UTC) #5
jamesr
lgtm
6 years, 3 months ago (2014-09-16 22:21:04 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/561273003/110001
6 years, 3 months ago (2014-09-16 23:28:11 UTC) #8
commit-bot: I haz the power
Committed patchset #7 (id:110001) as 3b64f4132e41d08eddf2f8e9176c1fd196a2a26a
6 years, 3 months ago (2014-09-17 01:07:32 UTC) #9
commit-bot: I haz the power
6 years, 3 months ago (2014-09-17 01:08:06 UTC) #10
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/c2e821a33bf4ffdf9d325bb0876bd9924284e228
Cr-Commit-Position: refs/heads/master@{#295203}

Powered by Google App Engine
This is Rietveld 408576698