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

Issue 1455203002: [GN] Add support to rebase_path to resolve paths above the source root. (Closed)

Created:
5 years, 1 month ago by slan
Modified:
5 years ago
Reviewers:
Dirk Pranke, brettw, alokp
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[GN] Add support to rebase_path to resolve paths above the source root. Currently, rebase_path clips any path which references the filesystem above or outside of the source root. Extend this functionality to allow rebase_path to properly resolve paths outside the source root when the absolute path to the source root is known. When the source root is unknown, the behavior will continue to clip. BUG=554241 TEST=gn_unittests Committed: https://crrev.com/910ac443ab1827eae049ae052af867d432ad7aac Cr-Commit-Position: refs/heads/master@{#363080}

Patch Set 1 #

Patch Set 2 : Correct comments. #

Patch Set 3 : Use empty() to evaluate emptiness #

Patch Set 4 : Only make path absolute when necessary #

Patch Set 5 : . #

Total comments: 4

Patch Set 6 : Add tests, handle Windows sources. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -21 lines) Patch
M tools/gn/filesystem_utils.h View 1 2 3 4 5 1 chunk +9 lines, -2 lines 0 comments Download
M tools/gn/filesystem_utils.cc View 1 2 3 4 5 2 chunks +42 lines, -3 lines 0 comments Download
M tools/gn/filesystem_utils_unittest.cc View 1 2 3 4 5 2 chunks +129 lines, -1 line 0 comments Download
M tools/gn/function_rebase_path_unittest.cc View 2 chunks +30 lines, -13 lines 0 comments Download
M tools/gn/source_dir.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/source_dir_unittest.cc View 1 2 3 4 5 2 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
slan
All, Here is the first pass at adding this functionality. It simply involves optionally passing ...
5 years, 1 month ago (2015-11-18 18:03:01 UTC) #2
brettw
On 2015/11/18 18:03:01, slan wrote: > All, > > Here is the first pass at ...
5 years, 1 month ago (2015-11-20 22:16:40 UTC) #3
slan
On 2015/11/20 22:16:40, brettw wrote: > On 2015/11/18 18:03:01, slan wrote: > > All, > ...
5 years, 1 month ago (2015-11-22 00:59:12 UTC) #4
slan
Friendly ping for feedback.
5 years ago (2015-11-30 14:49:47 UTC) #5
brettw
https://codereview.chromium.org/1455203002/diff/80001/tools/gn/filesystem_utils.cc File tools/gn/filesystem_utils.cc (right): https://codereview.chromium.org/1455203002/diff/80001/tools/gn/filesystem_utils.cc#newcode439 tools/gn/filesystem_utils.cc:439: const size_t len = source_root.ends_with("/") I think we can ...
5 years ago (2015-12-01 01:21:22 UTC) #6
brettw
I'm guessing it's best to have NormalizePath fix this when it prepends the source root ...
5 years ago (2015-12-01 17:46:43 UTC) #7
slan
Brett, thanks for the quick and thorough review. My latest PS accounts for many of ...
5 years ago (2015-12-01 22:15:03 UTC) #8
brettw
lgtm
5 years ago (2015-12-03 19:22:04 UTC) #9
slan
Dry run to test Windows. Will try to submit to CQ this afternoon, pending no ...
5 years ago (2015-12-03 19:24:11 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1455203002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1455203002/100001
5 years ago (2015-12-03 19:24:37 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-03 20:45:09 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1455203002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1455203002/100001
5 years ago (2015-12-03 23:31:38 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years ago (2015-12-04 01:40:46 UTC) #17
commit-bot: I haz the power
5 years ago (2015-12-04 01:42:33 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/910ac443ab1827eae049ae052af867d432ad7aac
Cr-Commit-Position: refs/heads/master@{#363080}

Powered by Google App Engine
This is Rietveld 408576698