• Dirk Pranke's avatar
    Reland "Add a Str() function to gclient for use in DEPS files." · fdd2cd6e
    Dirk Pranke authored
    This relands c7eed83f with a fix to the way variables are
    propagated from parent dependencies into child dependencies.
    
    The original CL description from c7eed83f was:
    > 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.
    >
    This reverts commit 84431987dd384c79c84515004d19db67345a1c00.
    
    Bug: 1099242
    TBR=ehmaldonado@chromium.org
    
    Change-Id: I047b871df47c367c1f34a3985e5813504e3c5c6f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2274152
    Commit-Queue: Dirk Pranke <dpranke@google.com>
    Reviewed-by: 's avatarBen Pastene <bpastene@chromium.org>
    fdd2cd6e
Name
Last commit
Last update
..
gstools Loading commit data...
OWNERS Loading commit data...
auth_test.py Loading commit data...
bot_update_coverage_test.py Loading commit data...
cipd_bootstrap_test.py Loading commit data...
detect_host_arch_test.py Loading commit data...
download_from_google_storage_unittest.py Loading commit data...
fetch_test.py Loading commit data...
fix_encoding_test.py Loading commit data...
gclient_cipd_smoketest.py Loading commit data...
gclient_eval_unittest.py Loading commit data...
gclient_git_smoketest.py Loading commit data...
gclient_paths_test.py Loading commit data...
gclient_scm_test.py Loading commit data...
gclient_smoketest.py Loading commit data...
gclient_smoketest_base.py Loading commit data...
gclient_test.py Loading commit data...
gclient_transitions_smoketest.py Loading commit data...
gclient_utils_test.py Loading commit data...
gerrit_client_test.py Loading commit data...
gerrit_util_test.py Loading commit data...
git_cache_test.py Loading commit data...
git_cl_creds_check_report.txt Loading commit data...
git_cl_test.py Loading commit data...
git_common_test.py Loading commit data...
git_dates_test.py Loading commit data...
git_drover_test.py Loading commit data...
git_find_releases_test.py Loading commit data...
git_footers_test.py Loading commit data...
git_hyper_blame_test.py Loading commit data...
git_map_test.py Loading commit data...
git_number_test.py Loading commit data...
git_rebase_update_test.py Loading commit data...
gsutil_test.py Loading commit data...
lockfile_test.py Loading commit data...
metrics_test.py Loading commit data...
my_activity_test.py Loading commit data...
ninjalog_uploader_test.py Loading commit data...
owners_finder_test.py Loading commit data...
owners_unittest.py Loading commit data...
presubmit_unittest.py Loading commit data...
recipes_test.py Loading commit data...
roll_dep_test.py Loading commit data...
scm_unittest.py Loading commit data...
subcommand_test.py Loading commit data...
subprocess2_test.py Loading commit data...
upload_to_google_storage_unittest.py Loading commit data...
watchlists_unittest.py Loading commit data...