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

Issue 2363193002: Use WithoutPathExpansion on DictionaryValue in GN. (Closed)

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

Description

Use WithoutPathExpansion on DictionaryValue in GN. The normal 'Set' methods on DictionaryValue scan for '.' in the path and assume that the '.' indexes into an inner DictionaryValue. At no point does gn appear to desire this behavior, so call the WithoutPathExpansion variants instead. This is mandatory when the path is user supplied, as it may have a '.' This change was motivated by a target named like 'x.y' which caused gn desc config //:x.y --format=json to produce something like "//:x": { "y": { "args": [ ... ] ... } } and similar issues when producing the project.json from the json ide generator. When the path is a constant which is known not to contain '.' there is no behavioral change, but the extra work of scanning for the '.' is avoided. In addition, if all uses are of the WithoutPathExpansion variant then it becomes much less likely that similar errors will be introduced in the future. Committed: https://crrev.com/d51d3527da33b8f736dda1e99bcd9dc1586b366f Cr-Commit-Position: refs/heads/master@{#421005}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -68 lines) Patch
M tools/gn/analyzer.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M tools/gn/command_desc.cc View 1 chunk +9 lines, -7 lines 0 comments Download
M tools/gn/desc_builder.cc View 13 chunks +75 lines, -50 lines 0 comments Download
M tools/gn/json_project_writer.cc View 1 chunk +12 lines, -8 lines 1 comment Download

Messages

Total messages: 15 (10 generated)
bungeman-chromium
https://codereview.chromium.org/2363193002/diff/1/tools/gn/json_project_writer.cc File tools/gn/json_project_writer.cc (left): https://codereview.chromium.org/2363193002/diff/1/tools/gn/json_project_writer.cc#oldcode104 tools/gn/json_project_writer.cc:104: std::move(description)); This 'Set' appears to be the one causing ...
4 years, 3 months ago (2016-09-23 22:26:00 UTC) #4
brettw
LGTM thanks!
4 years, 2 months ago (2016-09-26 21:12:52 UTC) #9
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/2363193002/1
4 years, 2 months ago (2016-09-26 21:33:22 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-09-26 21:46:07 UTC) #13
commit-bot: I haz the power
4 years, 2 months ago (2016-09-26 21:47:57 UTC) #15
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/d51d3527da33b8f736dda1e99bcd9dc1586b366f
Cr-Commit-Position: refs/heads/master@{#421005}

Powered by Google App Engine
This is Rietveld 408576698