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

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)

Created:
3 years, 6 months ago by alex-ac
Modified:
3 years, 5 months ago
Reviewers:
brettw
CC:
chromium-reviews, Dirk Pranke, tfarina, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement tracking of BUILD.gn files used to define target, toolchain or pool. Gn analyze will prune targets that could not be affected by changens in specified BUILD.gn or .gni file. Now each Scope knows set of source files, used to load that scope. And each Item inherits that set from scope. R=brettw BUG=555273 Review-Url: https://codereview.chromium.org/2940873002 Cr-Commit-Position: refs/heads/master@{#483337} Committed: https://chromium.googlesource.com/chromium/src/+/44fd682dac1080143af656bb828036b837aa2521

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use const InputFile* instead of hashes. #

Patch Set 3 : Use base::flat_set instead of std::set. #

Total comments: 5

Patch Set 4 : Use .gn file path from setup. #

Patch Set 5 : Fix compilation after rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+527 lines, -290 lines) Patch
M base/containers/flat_tree.h View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M tools/gn/analyzer.h View 1 2 3 3 chunks +7 lines, -1 line 0 comments Download
M tools/gn/analyzer.cc View 1 2 3 4 6 chunks +21 lines, -20 lines 0 comments Download
M tools/gn/analyzer_unittest.cc View 1 2 3 8 chunks +83 lines, -25 lines 0 comments Download
M tools/gn/builder_unittest.cc View 8 chunks +9 lines, -9 lines 0 comments Download
M tools/gn/command_analyze.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M tools/gn/config.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M tools/gn/config.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M tools/gn/config_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M tools/gn/config_values_extractors_unittest.cc View 4 chunks +14 lines, -11 lines 0 comments Download
M tools/gn/filesystem_utils_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_get_target_outputs_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/function_toolchain.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/functions.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M tools/gn/header_checker_unittest.cc View 4 chunks +11 lines, -9 lines 0 comments Download
M tools/gn/import_manager.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tools/gn/inherited_libraries_unittest.cc View 3 chunks +12 lines, -12 lines 0 comments Download
M tools/gn/input_conversion.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/input_file.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M tools/gn/item.h View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M tools/gn/item.cc View 1 1 chunk +7 lines, -4 lines 0 comments Download
M tools/gn/loader.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M tools/gn/loader_unittest.cc View 1 4 chunks +74 lines, -1 line 0 comments Download
M tools/gn/ninja_action_target_writer_unittest.cc View 1 2 3 4 8 chunks +10 lines, -10 lines 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 19 chunks +26 lines, -23 lines 0 comments Download
M tools/gn/ninja_build_writer_unittest.cc View 5 chunks +10 lines, -9 lines 0 comments Download
M tools/gn/ninja_bundle_data_target_writer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/ninja_copy_target_writer_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/ninja_create_bundle_target_writer_unittest.cc View 12 chunks +20 lines, -13 lines 0 comments Download
M tools/gn/ninja_group_target_writer_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M tools/gn/ninja_target_writer_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M tools/gn/operators_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/runtime_deps_unittest.cc View 1 2 3 4 11 chunks +27 lines, -26 lines 0 comments Download
M tools/gn/scope.h View 1 2 3 4 4 chunks +8 lines, -1 line 0 comments Download
M tools/gn/scope.cc View 1 2 3 4 7 chunks +18 lines, -10 lines 0 comments Download
M tools/gn/scope_per_file_provider_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/scope_unittest.cc View 1 2 3 14 chunks +39 lines, -11 lines 0 comments Download
M tools/gn/settings.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/setup.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M tools/gn/setup.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M tools/gn/string_utils_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/substitution_writer_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M tools/gn/target.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M tools/gn/target.cc View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M tools/gn/target_generator.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/target_unittest.cc View 13 chunks +25 lines, -23 lines 0 comments Download
M tools/gn/test_with_scope.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/toolchain.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M tools/gn/toolchain.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
alex-ac
brettw, please take a look.
3 years, 6 months ago (2017-06-14 14:34:40 UTC) #1
brettw
Sorry to have not done this yet! Dirk has been poking me about it. I've ...
3 years, 6 months ago (2017-06-23 21:31:37 UTC) #2
brettw
Did you consider using "const InputFile*" instead of uint32_t hashes of file names? The InputFile ...
3 years, 5 months ago (2017-06-27 00:50:40 UTC) #3
alex-ac
I've replaces uint32_t hashes of file names with const InputFile*. I've also replaced std::set with ...
3 years, 5 months ago (2017-06-27 13:46:32 UTC) #4
dyaroshev
On 2017/06/27 at 13:46:32, alex-ac wrote: > I've replaces uint32_t hashes of file names with ...
3 years, 5 months ago (2017-06-27 13:51:18 UTC) #6
brettw
Looks great. LGTM with a few tweaks. https://codereview.chromium.org/2940873002/diff/40001/tools/gn/analyzer.cc File tools/gn/analyzer.cc (right): https://codereview.chromium.org/2940873002/diff/40001/tools/gn/analyzer.cc#newcode406 tools/gn/analyzer.cc:406: if (file->value() ...
3 years, 5 months ago (2017-06-28 20:49:41 UTC) #7
alex-ac
https://codereview.chromium.org/2940873002/diff/40001/tools/gn/analyzer.cc File tools/gn/analyzer.cc (right): https://codereview.chromium.org/2940873002/diff/40001/tools/gn/analyzer.cc#newcode406 tools/gn/analyzer.cc:406: if (file->value() == "//.gn" || *file == build_config_file_) On ...
3 years, 5 months ago (2017-06-29 10:26:57 UTC) #8
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/2940873002/60001
3 years, 5 months ago (2017-06-29 10:27:12 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/489191)
3 years, 5 months ago (2017-06-29 10:39:25 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/2940873002/80001
3 years, 5 months ago (2017-06-29 11:00:03 UTC) #16
commit-bot: I haz the power
3 years, 5 months ago (2017-06-29 12:41:49 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/44fd682dac1080143af656bb8280...

Powered by Google App Engine
This is Rietveld 408576698