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

Issue 2627703002: Validate GN substitutions in args and rsp files. (Closed)

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

Description

Validate GN substitutions in args and rsp files. Previously GN did not validate the substitution types used in the args or response_file_contents for action_foreach targets. If a caller used an incorrect one (as was happening in the nocompile test template), GN would assert in debug mode and skip the substitution in release mode. This didn't seem to cause a problem for the nocompile test because the output file is not used. This adds the necessary validation for these types so GN will give a proper error message on misuse, and adds some additional unit tests for other aspects of action_foreach parameter validation. Review-Url: https://codereview.chromium.org/2627703002 Cr-Commit-Position: refs/heads/master@{#444507} Committed: https://chromium.googlesource.com/chromium/src/+/bb57bea1642b294af0578ab0e50d1c63bb5491b2

Patch Set 1 #

Patch Set 2 : Format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -28 lines) Patch
M build/nocompile.gni View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/action_target_generator.cc View 1 chunk +21 lines, -4 lines 0 comments Download
M tools/gn/action_target_generator_unittest.cc View 2 chunks +89 lines, -10 lines 0 comments Download
M tools/gn/ninja_action_target_writer.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/substitution_type.h View 2 chunks +7 lines, -3 lines 0 comments Download
M tools/gn/substitution_type.cc View 1 2 chunks +12 lines, -7 lines 0 comments Download
M tools/gn/target_generator.cc View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (15 generated)
brettw
Format
3 years, 11 months ago (2017-01-10 21:26:12 UTC) #1
brettw
I think you also noticed this assertion...
3 years, 11 months ago (2017-01-10 21:26:39 UTC) #4
brettw
-> Dirk
3 years, 11 months ago (2017-01-17 19:00:10 UTC) #11
Dirk Pranke
lgtm
3 years, 11 months ago (2017-01-18 21:00:19 UTC) #16
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/2627703002/20001
3 years, 11 months ago (2017-01-18 21:13:42 UTC) #18
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 22:11:42 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/bb57bea1642b294af0578ab0e50d...

Powered by Google App Engine
This is Rietveld 408576698