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

Unified Diff: build/android/gyp/util/build_utils.py

Issue 1618243004: Use gn_helpers to deserialize GN lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/zip.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/build_utils.py
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index fe69c956f0f9f49db1ceb4e085c84668e1c7a5fc..c601e06d7157fd97855749a8ecd781c22aac590f 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -77,6 +77,17 @@ def FindInDirectories(directories, filename_filter):
def ParseGnList(gn_string):
+ # TODO(brettw) bug 573132: This doesn't handle GN escaping properly, so any
+ # weird characters like $ or \ in the strings will be corrupted.
+ #
+ # The code should import build/gn_helpers.py and then do:
+ # parser = gn_helpers.GNValueParser(gn_string)
+ # return return parser.ParseList()
+ # As of this writing, though, there is a CastShell build script that sends
+ # JSON through this function, and using correct GN parsing corrupts that.
+ #
+ # We need to be consistent about passing either JSON or GN lists through
+ # this function.
return ast.literal_eval(gn_string)
« no previous file with comments | « no previous file | build/config/zip.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698