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

Issue 1804263003: Consider bundle_data as public_deps of create_bundle targets. (Closed)

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

Description

Consider bundle_data as public_deps of create_bundle targets. The create_bundle and bundle_data targets works as a pair to copy files into iOS/OS X bundles. The bundle_data target defines the files to copy and the destination in the bundle, the create_bundle target generate the copy rule (as the destination cannot be resolved earlier). This cause a problem with generated files, as gn prevents a target using as input a generated file unless there is a direct dependency or a chain of public dependencies. Since bundle_data/create_bundle are designed to be resolved recursively, update this check to consider all bundle_data as public_deps of create_bundle targets. Convert Target::PullRecursiveBundleData() to O(n) algorithm instead of a O(n^2) by percolating the dependencies up. BUG=297668 Committed: https://crrev.com/1cc4b1ca2085776730f92ab41173c6afd9d51d12 Cr-Commit-Position: refs/heads/master@{#383049}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Convert Target::PullRecursiveBundleData() to O(n) algorithm #

Patch Set 3 : Rebase on origin/master #

Total comments: 7

Patch Set 4 : Second round of comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -56 lines) Patch
M tools/gn/bundle_data.h View 1 2 3 3 chunks +26 lines, -13 lines 0 comments Download
M tools/gn/bundle_data.cc View 1 2 3 3 chunks +28 lines, -16 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 2 chunks +18 lines, -27 lines 0 comments Download
M tools/gn/target_unittest.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
sdefresne
When trying to get //ios/web/ios_web_shell to build, I found that the following dependency: ERROR Input ...
4 years, 9 months ago (2016-03-16 16:37:35 UTC) #2
brettw
https://codereview.chromium.org/1804263003/diff/1/tools/gn/target.cc File tools/gn/target.cc (left): https://codereview.chromium.org/1804263003/diff/1/tools/gn/target.cc#oldcode511 tools/gn/target.cc:511: deps.push_back(pair.ptr); I was studying Target::PullRecursiveBundleData more in the context ...
4 years, 9 months ago (2016-03-16 17:27:44 UTC) #3
brettw
https://codereview.chromium.org/1804263003/diff/1/tools/gn/target.cc File tools/gn/target.cc (left): https://codereview.chromium.org/1804263003/diff/1/tools/gn/target.cc#oldcode511 tools/gn/target.cc:511: deps.push_back(pair.ptr); I was studying Target::PullRecursiveBundleData more in the context ...
4 years, 9 months ago (2016-03-16 17:27:44 UTC) #4
sdefresne
Done, please take another look.
4 years, 9 months ago (2016-03-17 10:39:58 UTC) #6
sdefresne
Ping?
4 years, 9 months ago (2016-03-19 14:00:19 UTC) #7
brettw
We should get a unit test for this new behavior. https://codereview.chromium.org/1804263003/diff/40001/tools/gn/bundle_data.h File tools/gn/bundle_data.h (right): https://codereview.chromium.org/1804263003/diff/40001/tools/gn/bundle_data.h#newcode80 ...
4 years, 9 months ago (2016-03-21 22:49:47 UTC) #8
brettw
https://codereview.chromium.org/1804263003/diff/40001/tools/gn/target.cc File tools/gn/target.cc (right): https://codereview.chromium.org/1804263003/diff/40001/tools/gn/target.cc#newcode512 tools/gn/target.cc:512: bundle_data_.AddFileRuleFromTarget(target); On 2016/03/21 22:49:47, brettw wrote: > Can this ...
4 years, 9 months ago (2016-03-21 22:59:08 UTC) #9
sdefresne
Please take another look. Regarding unit tests, did you mean check that bundle_deps is correctly ...
4 years, 9 months ago (2016-03-22 12:34:05 UTC) #10
brettw
LGTM. For my previous comment about tests I was mostly concerned about the propagation of ...
4 years, 9 months ago (2016-03-23 23:18:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1804263003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1804263003/60001
4 years, 9 months ago (2016-03-24 09:55:56 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 9 months ago (2016-03-24 10:25:09 UTC) #14
commit-bot: I haz the power
4 years, 9 months ago (2016-03-24 10:27:40 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1cc4b1ca2085776730f92ab41173c6afd9d51d12
Cr-Commit-Position: refs/heads/master@{#383049}

Powered by Google App Engine
This is Rietveld 408576698