Previously, gclient would attempt to write an args file after
a dependency was checked out, but before any sub-dependencies
had been checked out. If the args file path pointed at something
inside a sub-dependency, this wouldn't work, because the directory
might not yet exist. This most obviously happened for buildspec
clobber builds.
The fix is to wait until after the sub-dependencies have been
checked out to write the file.
R=phajdan.jr@chromium.org, mmoss@chromium.org
BUG=773933
Change-Id: I0cf4564204f7dabd9f843dc7904db7050fcc0d23
Reviewed-on: https://chromium-review.googlesource.com/714644
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Bug: 661382
Change-Id: Id50b2541132002452bc5d86bb013758e8be0f4b0
Reviewed-on: https://chromium-review.googlesource.com/697813
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
- provide structured output
- take deps_file fallback into account
Bug: 756474
Change-Id: Icb15eb9601b0aaf510300cf8992b067a25f6888a
Reviewed-on: https://chromium-review.googlesource.com/663258
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This CL includes this as comments in flattened DEPS, as requested
on the bug. For automated processes using this, we should export
the data in machine-readable form outside of the DEPS file.
Bug: 756474, 570091
Change-Id: I78cd2105113f41d599e293e772e1f1ca42679f3c
Reviewed-on: https://chromium-review.googlesource.com/621726
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
We need to pass OS info to recursively called _flatten_dep.
Regular deps entries in OS-specific DEPS file recursed into
need to be marked as OS-specific in the flattened file.
Bug: 570091
Change-Id: If3055b84143d8a52d10d8753113893b5054b4d07
Reviewed-on: https://chromium-review.googlesource.com/621046
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Bug: 570091
Change-Id: I773b74b042233efa2a525f5f47e920468b7fea4a
Reviewed-on: https://chromium-review.googlesource.com/618930
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Consistently pin all dependencies - including deps_os and ones
with shortened shas.
We add --process-all-deps switch so that users can easily
tell gclient to check out all affected dependencies locally.
Bug: 570091
Change-Id: If68db98000c569ae35dd7d0a4b695eb80a589213
Reviewed-on: https://chromium-review.googlesource.com/617224
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This finally makes the code structure seem right as well: there's just
one method (_flatten_dep), with a simpler control flow.
Also added a regression test.
Bug: 570091
Change-Id: I22ac7a3af0429a7ffd874b4b1715c0f6c72e0006
Reviewed-on: https://chromium-review.googlesource.com/608241
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Nice side-effect of this change is simplifying the code.
Also added regression test coverage.
Bug: 570091
Change-Id: I470e9efc319632f997b02d210483988c17a7d3c8
Reviewed-on: https://chromium-review.googlesource.com/600369
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.
Update the tool boostraps to suppress any sort of syncing logs, if it
does happen. This will ensure that users who execute the tools don't see
unexpected output.
BUG=chromium:748651
TEST=local
- Tested on Mac and Windows.
Change-Id: I1aad897d885a07beeac40a372a658681720efd2a
Reviewed-on: https://chromium-review.googlesource.com/591229
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
This is an exact reland of https://chromium-review.googlesource.com/583617 .
One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.
This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.
One of possible next steps might be to deprecate Var().
Bug: 570091, 748486
Change-Id: Id47e3771b7163149a4cd427b84f84ece52772f34
Reviewed-on: https://chromium-review.googlesource.com/586594
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This reverts commit 4d92fe4300.
Reason for revert: This moved the logging from invoking `led` or `vpython` to whenever someone would run something that would end up invoking `update_depot_tools`. It's good that we are calling this when we run update_depot_tools, but we probably should've suppressed the logging there in at least the success case, because now things are even more confusing. See crbug.com/748651.
Original change's description:
> [bootstraps] Sync at gclient, suppress output.
>
> Have the "update_depot_tools" script also do a CIPD tool sync. This will
> ensure that users and systems have access to tooling at sync-time rather
> than just-in-time loading them at execution time.
>
> Update the tool boostraps to suppress any sort of syncing logic, if it
> does happen. This will ensure that users who execute the tools don't se
> unexpected output.
>
> BUG=None
> TEST=local
> - Tested on Mac and Windows.
>
> R=dpranke@chromium.org, iannucci@chromium.org
>
> Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
> Reviewed-on: https://chromium-review.googlesource.com/581494
> Commit-Queue: Daniel Jacques <dnj@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
TBR=iannucci@chromium.org,dpranke@chromium.org,dnj@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: None
Change-Id: I2485c9dd2e48a8dbdeebfff5da9d4c708e0edcb7
Reviewed-on: https://chromium-review.googlesource.com/585867
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
This reverts commit e79ddeaabf.
Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=748486
Original change's description:
> gclient flatten: preserve variable placeholders
>
> One of the main use cases is making it clear which revision hashes
> need to be changed together. The way it's usually done is one variable
> referenced several times. With this CL, we preserve the references
> from original DEPS, as opposed to evaluating them and losing some info.
>
> This CL actually makes Var() emit a variable placeholder
> instead of its value, and adds support for these placeholders
> to gclient.
>
> One of possible next steps might be to deprecate Var().
>
> Bug: 570091
> Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
> Reviewed-on: https://chromium-review.googlesource.com/583617
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
TBR=phajdan.jr@chromium.org,dpranke@chromium.org
Change-Id: If9c52ebfa78aba8041ce797ff842d09952d0e2ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 570091, 748486
Reviewed-on: https://chromium-review.googlesource.com/584907
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.
This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.
One of possible next steps might be to deprecate Var().
Bug: 570091
Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
Reviewed-on: https://chromium-review.googlesource.com/583617
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.
Update the tool boostraps to suppress any sort of syncing logic, if it
does happen. This will ensure that users who execute the tools don't se
unexpected output.
BUG=None
TEST=local
- Tested on Mac and Windows.
R=dpranke@chromium.org, iannucci@chromium.org
Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
Reviewed-on: https://chromium-review.googlesource.com/581494
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Added a regression test. Simplified some logic - if we don't add os-specific
deps and hooks to |dependencies|, we don't need to keep separate original values.
Bug: 570091
Change-Id: I5bdd0b6a66df6b3a2b99d0ad9c6e54ee7114f09b
Reviewed-on: https://chromium-review.googlesource.com/581687
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
R=dpranke@chromium.org, phajdan.jr@chromium.org
Bug: 570091
Change-Id: Ic2aa1a9fe18f3fe8d5aa6fa4c4e9269106b36092
Reviewed-on: https://chromium-review.googlesource.com/553719
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Di Mu <dimu@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Bug: 570091
Change-Id: Ia7f81a81d7df75004c5f8b7560dfd50a14f4cddd
Reviewed-on: https://chromium-review.googlesource.com/549355
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Bug: 570091
Change-Id: Iae9dad68a75d751ceac6379baac588f32c59aa06
Reviewed-on: https://chromium-review.googlesource.com/548935
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This is a reland of https://chromium-review.googlesource.com/c/541280/
with a fix for https://bugs.chromium.org/p/chromium/issues/detail?id=735418
(patchset 1 is original patch, patchset 2 has the fix).
Keep deps_os entries in dependencies, just with should_process set to False
for entries not applicable to target OS list.
This way gclient flatten has proper access to dependencies e.g. to evaluate
recursedeps referring to deps_os entries other than active OS.
Allow but ignore deps_os overriding a value with None, since that does not
fit the new model. There's no correctness harm in not checking out a repo.
Allow "overrides" setting given dependency to the same value. This seems
fairly common, especially for mac/ios and unix/android, even in chromium/src.
Bug: 570091, 735418
Change-Id: I6eba0e4be202212eb86cb959c18f2b2f0c1452b9
Reviewed-on: https://chromium-review.googlesource.com/543076
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This reverts commit 529d6a4e4a.
Reason for revert: broke developers and CI/Try checkouts.
Bug: 735418
Original change's description:
> gclient: include deps_os entries in dependencies
>
> Keep deps_os entries in dependencies, just with should_process set to False
> for entries not applicable to target OS list.
>
> This way gclient flatten has proper access to dependencies e.g. to evaluate
> recursedeps referring to deps_os entries other than active OS.
>
> Allow but ignore deps_os overriding a value with None, since that does not
> fit the new model. There's no correctness harm in not checking out a repo.
>
> Allow "overrides" setting given dependency to the same value. This seems
> fairly common, especially for mac/ios and unix/android, even in chromium/src.
>
> Bug: 570091
> Change-Id: I2037a1ecc5fd2da6b5f73061548b81fc79ba2e72
> Reviewed-on: https://chromium-review.googlesource.com/541280
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
TBR=phajdan.jr@chromium.org,dpranke@chromium.org
Change-Id: Iaa0c39865908a5b25c15dda54ba61c0e76abcbea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 570091
Reviewed-on: https://chromium-review.googlesource.com/543138
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Keep deps_os entries in dependencies, just with should_process set to False
for entries not applicable to target OS list.
This way gclient flatten has proper access to dependencies e.g. to evaluate
recursedeps referring to deps_os entries other than active OS.
Allow but ignore deps_os overriding a value with None, since that does not
fit the new model. There's no correctness harm in not checking out a repo.
Allow "overrides" setting given dependency to the same value. This seems
fairly common, especially for mac/ios and unix/android, even in chromium/src.
Bug: 570091
Change-Id: I2037a1ecc5fd2da6b5f73061548b81fc79ba2e72
Reviewed-on: https://chromium-review.googlesource.com/541280
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This makes it possible to run hooks properly
in flattened DEPS.
Bug: 570091
Change-Id: If8175a57ebe8f607bd4ac83d4a26dcc4cc18165c
Reviewed-on: https://chromium-review.googlesource.com/535476
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
This is based on https://codereview.chromium.org/2474543002/
Bug: 661382
Change-Id: I191ec16e0ce69a782979ae7d59b108747429ab78
Reviewed-on: https://chromium-review.googlesource.com/505067
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
This reverts commit 2c199e1ec4.
Reason for revert: This makes calls to gclient that have the only intention of updating gclient fail, like:
https://cs.chromium.org/chromium/src/v8/tools/try_perf.py?l=93
Reverting for now to give time to clean up such scripts before reland.
Original change's description:
> gclient: return non-zero exit code on unknown command
>
> Bug: none
> Change-Id: I447f66765679b7b66b5748af1cf1f501610603bf
> Reviewed-on: https://chromium-review.googlesource.com/504408
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
>
TBR=iannucci@chromium.org,phajdan.jr@chromium.org,dpranke@chromium.org,tandrii@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: none
Change-Id: I9496f7192dfde1e38c186a94ac985190b76b2438
Reviewed-on: https://chromium-review.googlesource.com/506563
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.
The purpose is to slightly improve readability of pylint
disable comments.
Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>