Regards, Igor--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9cbed0bb-41b0-4e29-9573-2bc313196a80n%40chromium.org.
Hi,Just to clarify, src/third_party/depot_tools can be used just as depot_tools outside Chromium tree, right?
As for the initial bootstrap why not to have a script in Chromium src that clones depot_tools into src/third_party/depot_tools and then calls fetch/gclient there?
Yes, except that the one in third_party is set to not auto-update, because we want the version to be pinned so scripts in src/ and other places can count on modules being where we expect them to be. And, we don't want you to use a pinned version of the tools in your $PATH, we want the commands that you do run to auto-update.
You could do something like that, though there are a bunch of smaller issues you'd have to fix. There's also questions that arise only in that situation, like how to handle multiple checkouts, and whether you run into issues where something like fetch/gclient wants to update to a new version of itself (which is usually hard to do cleanly on Windows, at least).
On Thu, Mar 9, 2023 at 10:44 PM Dirk Pranke <dpr...@google.com> wrote:Yes, except that the one in third_party is set to not auto-update, because we want the version to be pinned so scripts in src/ and other places can count on modules being where we expect them to be. And, we don't want you to use a pinned version of the tools in your $PATH, we want the commands that you do run to auto-update.Hm, but ninja, probably the most often used command, is already moved to Chromium src with ninja in depot_tools becoming just an invocation script to find ninja in Chromium/src. So why the reasoning about auto-updates does not apply for ninja?
You could do something like that, though there are a bunch of smaller issues you'd have to fix. There's also questions that arise only in that situation, like how to handle multiple checkouts, and whether you run into issues where something like fetch/gclient wants to update to a new version of itself (which is usually hard to do cleanly on Windows, at least).At least on Linux the following already works to avoid duplicated depot_tools:# No chromium at this pointmkdir -p chromium/src/third_partycd chromiumgit -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.gitset PATH to point to depot_tools under src/third_party# fecth chromium does not work as it does not see that src is empty, so create .gclient manuallygclient config --spec 'solutions = [
{
"name": "src",
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"custom_deps": {},
"custom_vars": {},
},
]'gclient syncThe sync updates depot_tools to the appropriate version and populates src with a full Chromium. So already on Linux and presumably on Mac one does not need an extra depot_tools. And if the fetch command can be fixed to allow the above usage, then the instructions for the checkout will be just by some characters longer.
Regards, Igor
On Thu, Mar 9, 2023 at 3:27 PM Igor Bukanov <ibuk...@zscaler.com> wrote:On Thu, Mar 9, 2023 at 10:44 PM Dirk Pranke <dpr...@google.com> wrote:Yes, except that the one in third_party is set to not auto-update, because we want the version to be pinned so scripts in src/ and other places can count on modules being where we expect them to be. And, we don't want you to use a pinned version of the tools in your $PATH, we want the commands that you do run to auto-update.Hm, but ninja, probably the most often used command, is already moved to Chromium src with ninja in depot_tools becoming just an invocation script to find ninja in Chromium/src. So why the reasoning about auto-updates does not apply for ninja?We don't actually want ninja to auto-update, we want to be able to build using the exact version of the build tool that we used at that revision. That's exactly why we were able to move it into Chromium src once we had CIPD packages for it.The things that we do want to update are the tools that go talk to other machines, like git-cl, because their API might change over time and we'd need to keep things up to date.
I guess I'm not sure that the bug has been corrected. ninja is still being retrieved from the non-pinned depot_tools, a mechanism which has been fragile and may be in the future (from a backwards compatibility point of view).