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

Issue 287693002: Support private values in GN. (Closed)

Created:
6 years, 7 months ago by brettw
Modified:
6 years, 7 months ago
Reviewers:
cjhopman
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Support private values in GN. This adds special handling for variables that begin with underscores, which is inspired by Dart. Such variables are not imported when doing an import, which gives .gni files a way to have intermediate private variables that won't pollute the scopes of the files that include them. This also applies to the root build config, which can have private values now. Adds some missing unused variable checks. This was disabled because processing imports would mean all imported variables were unused, and files not using all of them would get unused variable errors. This adds the option to mark merged values on a scope as used, which is used for imported values. BUG=341738 R=cjhopman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271078

Patch Set 1 #

Patch Set 2 : docs #

Total comments: 6

Patch Set 3 : review comments #

Patch Set 4 : fix semicolon #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -139 lines) Patch
M build/config/BUILDCONFIG.gn View 8 chunks +96 lines, -111 lines 0 comments Download
M tools/gn/function_set_defaults.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/functions.cc View 1 2 2 chunks +8 lines, -2 lines 0 comments Download
M tools/gn/import_manager.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M tools/gn/loader.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M tools/gn/parse_tree.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/parse_tree_unittest.cc View 1 chunk +29 lines, -0 lines 0 comments Download
M tools/gn/scope.h View 1 2 3 chunks +40 lines, -13 lines 0 comments Download
M tools/gn/scope.cc View 1 2 7 chunks +43 lines, -7 lines 0 comments Download
M tools/gn/scope_unittest.cc View 1 2 3 5 chunks +71 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
brettw
6 years, 7 months ago (2014-05-13 21:28:02 UTC) #1
cjhopman
This is nice, but it limits "modules" to be single files. I basically want foo.gni ...
6 years, 7 months ago (2014-05-14 16:42:43 UTC) #2
brettw
New snap up. https://codereview.chromium.org/287693002/diff/20001/tools/gn/import_manager.cc File tools/gn/import_manager.cc (right): https://codereview.chromium.org/287693002/diff/20001/tools/gn/import_manager.cc#newcode91 tools/gn/import_manager.cc:91: options.mark_used = true; // Don't require ...
6 years, 7 months ago (2014-05-15 19:44:15 UTC) #3
cjhopman
lgtm
6 years, 7 months ago (2014-05-15 21:16:49 UTC) #4
brettw
6 years, 7 months ago (2014-05-16 19:31:41 UTC) #5
Message was sent while issue was closed.
Committed patchset #4 manually as r271078 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698