-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skip ValueError for long, list and dict type; #1085
Conversation
@@ -1222,6 +1222,8 @@ def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in, | |||
# Skip "variables", which was already processed if present. | |||
if key != 'variables' and type(value) is str: | |||
expanded = ExpandVariables(value, phase, variables, build_file) | |||
if type(expanded) in (long, list, dict): | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look self-evidently correct to me. What is yarn doing that npm doesn't that causes ExpandVariables to return unexpected types? long
is acceptable because int
is accepted but why list
and dict
? With what keys do you get those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems I answered that question 8 months ago in #903 (comment)... I suppose the question then becomes whether this is the only ExpandVariables call site that needs updating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added extra debug lines.
I got only long
. No list
or dict
.
[
{"type(expanded)": "<type 'long'>", "expanded": "1483986851164", "value": "1483986851164", "phase": "0", "build_file": "binding.gyp"}
{"type(expanded)": "<type 'long'>", "expanded": "1483986851164", "value": "1483986851164", "phase": "0", "build_file": "deps\\libexpat\\libexpat.gyp"}
]
allow long as result of ExpandVariables call. along with str and int. skip long type(value) along with str
skip ValueError for long, list and dict type;
refs yarnpkg/yarn#2286
refs yarnpkg/yarn#2376