Switching clang-format script wrapper to Python 3?

18 views
Skip to first unread message

Raphael Kubo Da Costa

unread,
Sep 29, 2021, 6:47:19 AM9/29/21
to chromium-packagers
Hi all,

The Chromium tarballs currently ship with this script here as buildtools/linux64/clang-format:


which is invoked by default as part of the Blink build to automatically format the generated bindings files.

I'd like to change the shebang line to invoke Python 3 instead.

I don't think this would cause any issues building Chromium, unless there is no Python 3 in the build environment -- I doubt this is the case these days, but I'm double-checking just in case. If that's really the case, since 93.0.4539.0 
it has been possible to pass blink_enable_generated_code_formatting=false to GN to avoid formatting those files automatically.

Raphael Kubo Da Costa

unread,
Sep 29, 2021, 6:49:14 AM9/29/21
to chromium-packagers
On Wednesday, 29 September 2021 at 12:47:19 UTC+2 Raphael Kubo Da Costa wrote:
I'd like to change the shebang line to invoke Python 3 instead.

Just to be clear, I meant changing the shebang line and making any other adjustments that might be required to make the code run with Python 3. 

Lei Zhang

unread,
Sep 29, 2021, 12:20:32 PM9/29/21
to Raphael Kubo Da Costa, chromium-packagers, Thomas Anderson
Thanks for noticing this. I filed crbug.com/1254408

Tom Callaway

unread,
Sep 29, 2021, 12:32:54 PM9/29/21
to Lei Zhang, Raphael Kubo Da Costa, chromium-packagers, Thomas Anderson
Fedora has been using this patch to accomplish this task. I waive any copyright on this work.

~spot

--
You received this message because you are subscribed to the Google Groups "chromium-packagers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-packag...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-packagers/CACSHbcRpOvnxZQnzQZ2vHRateBQxc9vyU9NAtmwCntJEpJ-8RA%40mail.gmail.com.
chromium-93.0.4577.63-clang-format.patch

Kubo Da Costa, Raphael

unread,
Oct 7, 2021, 5:19:58 AM10/7/21
to spo...@gmail.com, thomasa...@chromium.org, chromium-...@chromium.org
Thanks, Tom. I ended up doing something different in https://chromium-review.googlesource.com/c/chromium/tools/build/+/3208706

Looking at the time that CL landed and the publish tarball runs, I think 95.0.4638.40 and 96.0.4662.2 are the first tarballs to ship with the new version.

If anyone builds beta and/or canary packages, testing would be appreciated.
Reply all
Reply to author
Forward
0 new messages