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

Issue 2094021: Raise an error when a configuration dictionary contains invalid keys.... (Closed)

Created:
10 years, 7 months ago by Lei Zhang
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Raise an error when a configuration dictionary contains invalid keys. BUG=none TEST=included Committed: http://code.google.com/p/gyp/source/detail?r=827

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -0 lines) Patch
M pylib/gyp/input.py View 1 2 chunks +23 lines, -0 lines 0 comments Download
A test/configurations/invalid/actions.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/all_dependent_settings.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/configurations.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/dependencies.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/direct_dependent_settings.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/gyptest-configurations.py View 1 1 chunk +35 lines, -0 lines 0 comments Download
A test/configurations/invalid/libraries.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/link_settings.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/sources.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/target_name.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download
A test/configurations/invalid/type.gyp View 1 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lei Zhang
http://code.google.com/p/gyp/wiki/GypLanguageSpecification says: "A configuration dictionary may contain anything that can be found within a target ...
10 years, 7 months ago (2010-05-21 20:36:45 UTC) #1
Mark Mentovai
lgo http://codereview.chromium.org/2094021/diff/1/2 File pylib/gyp/input.py (right): http://codereview.chromium.org/2094021/diff/1/2#newcode1806 pylib/gyp/input.py:1806: raise KeyError, ('%s are not allowed in the ...
10 years, 7 months ago (2010-05-21 21:12:13 UTC) #2
Mark Mentovai
P.S. great idea!
10 years, 7 months ago (2010-05-21 21:12:26 UTC) #3
Lei Zhang
10 years, 7 months ago (2010-05-22 01:21:21 UTC) #4
http://codereview.chromium.org/2094021/diff/1/2
File pylib/gyp/input.py (right):

http://codereview.chromium.org/2094021/diff/1/2#newcode1806
pylib/gyp/input.py:1806: raise KeyError, ('%s are not allowed in the %s
configuration'
On 2010/05/21 21:12:13, Mark Mentovai wrote:
> "are" being correct depends on the value of |key|. Most keys that will show up
> here are plural, but target_name and type are not, and there’s no guarantee
> about future ones. I’d just leave the verb out. Also, I’d include the value of
> target for debugging purposes. '%s not allowed in configuration %s, found in
> target %s' % (key, configuration, target).

Done. As you may have guessed, I started with "actions".

http://codereview.chromium.org/2094021/diff/1/4
File test/configurations/invalid/all_dependent_settings.gyp (right):

http://codereview.chromium.org/2094021/diff/1/4#newcode9
test/configurations/invalid/all_dependent_settings.gyp:9: 'type': 'executable',
On 2010/05/21 21:12:13, Mark Mentovai wrote:
> These are all invalid for other reasons: they’re executables without sources.
> Make it so that they would all be valid were it not for the bogus key in their
> configuration dicts. Maybe just declare them as 'type': 'none'.

Done.

Powered by Google App Engine
This is Rietveld 408576698