You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gclient's existing functionality for handling variables is
ambiguous: the value of a variable can either be a string literal
or an expression fragment. The implementation is required to
parse a value as an expression, and, if it is legal, treat it
as an expression instead of a literal. This means that
gclient_gn_args_file = 'src/build/args.gni'
gclient_gn_args = ['xcode_version']
vars = {
'xcode_version': 'xcode-12'
}
would cause a problem because gclient would try to parse the
variable as an expression, and 'xcode' would not be defined.
This patch adds a workaround for this, where you can instead
use the Str() function to explicitly tell gclient to treat the
value as a string and not a potential expression.
The above example would be changed to:
gclient_gn_args_file = 'src/build/args.gni'
gclient_gn_args = ['xcode_version']
vars = {
'xcode_version': Str('xcode-12')
}
The variable may still be used in every context where it was legal
to be used before.
Bug: 1099242
Change-Id: Ic2a17eea5f7098113bdba0557fe29e1a931a74b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268406
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
|
6 years ago | |
|---|---|---|
| .. | ||
| gstools | ||
| OWNERS | ||
| auth_test.py | 6 years ago | |
| bot_update_coverage_test.py | ||
| cipd_bootstrap_test.py | 6 years ago | |
| detect_host_arch_test.py | ||
| download_from_google_storage_unittest.py | 6 years ago | |
| fetch_test.py | ||
| fix_encoding_test.py | ||
| gclient_cipd_smoketest.py | 6 years ago | |
| gclient_eval_unittest.py | 6 years ago | |
| gclient_git_smoketest.py | 6 years ago | |
| gclient_paths_test.py | ||
| gclient_scm_test.py | 6 years ago | |
| gclient_smoketest.py | 6 years ago | |
| gclient_smoketest_base.py | 6 years ago | |
| gclient_test.py | 6 years ago | |
| gclient_transitions_smoketest.py | 6 years ago | |
| gclient_utils_test.py | ||
| gerrit_client_test.py | ||
| gerrit_util_test.py | 6 years ago | |
| git_cache_test.py | 6 years ago | |
| git_cl_creds_check_report.txt | ||
| git_cl_test.py | 6 years ago | |
| git_common_test.py | ||
| git_dates_test.py | ||
| git_drover_test.py | 6 years ago | |
| git_find_releases_test.py | ||
| git_footers_test.py | ||
| git_hyper_blame_test.py | 6 years ago | |
| git_map_test.py | ||
| git_number_test.py | ||
| git_rebase_update_test.py | ||
| gsutil_test.py | ||
| lockfile_test.py | 6 years ago | |
| metrics_test.py | 6 years ago | |
| my_activity_test.py | 6 years ago | |
| ninjalog_uploader_test.py | ||
| owners_finder_test.py | 6 years ago | |
| owners_unittest.py | 6 years ago | |
| presubmit_unittest.py | 6 years ago | |
| recipes_test.py | ||
| roll_dep_test.py | 6 years ago | |
| scm_unittest.py | 6 years ago | |
| subcommand_test.py | ||
| subprocess2_test.py | ||
| upload_to_google_storage_unittest.py | ||
| watchlists_unittest.py | ||