Chromium
Ref
M1 Mac Build
Contribute
Yuki Osaki 作成いたしました! 至らないところもあるかとおもいますが、お時間ございます時に、ご確認お願いします
必要な事すべて説明されてて、何も言うことないCLでしたので、あっさりR+1、CQ+2しました。
Chromiumでは、レビューでOKが出たらCommit Queueに登録します。すると、自動でCIが走って問題なければ順番にcommitされていきます。
AUTHORのリスト
レビューまわりについて少し説明しておこうと思います。
僕らが使ってるgerritっていうサービスなんですが、パッチに対してWIPとpublishedっていう2つのステートがあります。uploadしただけだとWIPになっており、一般的にはまだレビューを求めてない作業中のパッチ、という意味を持ちます。レビューできる段階になったらreviewerを追加してpublishしてください(事前にreviewerを入れてWIP状態にしておいても良い)。WIPの段階でデザインの方向性に関してコメントを貰ったりヘルプを求めたりって事もありますが、そういう場合もpublishしておいた方が、相手がレビューリクエストに気づきやすいです。
それともう1つ、誰がアクションを求められてるかわかりやすくする仕組みとしてattention setという概念が最近導入されました。レビューであったり、質問に答えるであったり、あるいはCL authorとしてパッチを変更するなり、なんらかのアクションが必要な人に対してattention setのbitが立つ感じです。複数のレビューワーがいる場合など、次は誰に見てもらいたいか、誰がすでに承認を出しているかの目安にもなっています。これを立て忘れると見落とされる可能性が高くなるので、反応がないな、と思ったらsetしてるか確認してみてください。
自分とかもincoming reviewには常に20前後入ってて、普段はattention setが立っているYour Turnって扱いのCLがないかだけをチェックしてる事が多いです。
good first bug
taskさん
issue
テスト走らす
mac_build_instructions.md
code: zsh
~/chromium/src
$ out/Default/unit_tests --gtest_filter="PushClientTest.*"
zsh: no such file or directory: out/Default/unit_tests
code: zsh
~/chromium/src
$ autoninja -C out/Default unit_tests
ninja: Entering directory `out/Default'
~/chromium/src
$ out/Default/unit_tests --gtest_filter="PushClientTest.*"
IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
WARNING: No matching tests to run.
SUCCESS: all tests passed.
Tests took 0 seconds.
issue
PR作成
https://scrapbox.io/files/61c1a98330483c001f13d7c4.png
code: txt
Configure Git
Configure Git with a cookie for this service by copying this script and pasting it into a shell.
Windows Users ↴
Authenticate as mariobaske@i.softbank.jp to chromium.googlesource.com
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
touch ~/.gitcookies
chmod 0600 ~/.gitcookies
git config --global http.cookiefile ~/.gitcookies
tr , \\t <<\__END__ >>~/.gitcookies
chromium.googlesource.com,FALSE,/,TRUE,2147483647,o,git-mariobaske.i.softbank.jp=1//0gtCV5awLtfoMCgYIARAAGBASNwF-L9Irn3OZXkV9QFrj2sHWGrNH4pNh8ui_fBWn2ShbMuI9Aqot-R0uZ-Cn5-mEtX8-f2npFQs
chromium-review.googlesource.com,FALSE,/,TRUE,2147483647,o,git-mariobaske.i.softbank.jp=1//0gtCV5awLtfoMCgYIARAAGBASNwF-L9Irn3OZXkV9QFrj2sHWGrNH4pNh8ui_fBWn2ShbMuI9Aqot-R0uZ-Cn5-mEtX8-f2npFQs
__END__
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
This script is designed to work in bash and zsh. It ensures that the password is not saved in your shell history.
If your home directory is on a network filesystem, consider using a location on local disk.
Also, some of the hermetic binaries in depot_tools aren‘t available for Arm yet. Most notably, some parts of vpython are not yet working (tracking bug). The main effect of this is that some presubmits don’t yet work, and you need to use git cl upload --bypass-hooks to upload CLs.
code: zsh
~/chromium/src
$ git checkout -b mac-build-docs -t origin/main
M AUTHORS
M docs/mac_build_instructions.md
Branch 'mac-build-docs' set up to track remote branch 'main' from 'origin'.
Switched to a new branch 'mac-build-docs'
~/chromium/src
$ git rebase -i @{u}
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
~/chromium/src
$ git add .
$ git commit -a
Add the necessary commands to docs/mac_build_instructions.md
If don't run autoninja -C out/Default unit_tests, you will get the following error:
`zsh
$ out/Default/unit_tests --gtest_filter="PushClientTest.*"
zsh: no such file or directory: out/Default/unit_tests
`
~/chromium/src
$ git rebase -i @{u}
Successfully rebased and updated refs/heads/mac-build-docs.
~/chromium/src
$ export PATH="$PATH:/Users/wafuwafu13/depot_tools"
~/chromium/src
$ git rebase-update
Fetching origin
remote: Finding sources: 100% (10141/10141)
remote: Total 10141 (delta 5641), reused 9847 (delta 5641)
Receiving objects: 100% (10141/10141), 43.94 MiB | 1.84 MiB/s, done.
Resolving deltas: 100% (5641/5641), completed with 1738 local objects.
d462c4f8c60ed..4785f75fe89ad main -> origin/main
cdafc5868b71f..4a949e8726807 lkgr -> origin/lkgr
eb77c2bee8f4d..6e5d4d4b72b73 lkgr-android-internal -> origin/lkgr-android-internal
* new tag 96.0.4664.121 -> 96.0.4664.121 * new tag 96.0.4664.122 -> 96.0.4664.122 * new tag 96.0.4664.123 -> 96.0.4664.123 * new tag 97.0.4692.61 -> 97.0.4692.61 * new tag 97.0.4692.62 -> 97.0.4692.62 * new tag 97.0.4692.63 -> 97.0.4692.63 * new tag 98.0.4758.18 -> 98.0.4758.18 * new tag 98.0.4758.19 -> 98.0.4758.19 * new tag 98.0.4758.20 -> 98.0.4758.20 * new tag 99.0.4776.0 -> 99.0.4776.0 * new tag 99.0.4776.1 -> 99.0.4776.1 * new tag 99.0.4777.0 -> 99.0.4777.0 * new tag 99.0.4777.1 -> 99.0.4777.1 * new tag 99.0.4778.0 -> 99.0.4778.0 * new tag 99.0.4778.1 -> 99.0.4778.1 * new tag 99.0.4779.0 -> 99.0.4779.0 * new tag 99.0.4779.1 -> 99.0.4779.1 * new tag 99.0.4780.0 -> 99.0.4780.0 * new tag 99.0.4780.1 -> 99.0.4780.1 * new tag 99.0.4781.0 -> 99.0.4781.0 * new tag 99.0.4781.1 -> 99.0.4781.1 Rebasing: mac-build-docs
Rebasing: main
Deleted branch main (was 4785f75fe89ad).
Running git gc --auto - Ctrl-C to abort is OK.
~/chromium/src
$ git cl upload --bypass-hooks
# Enter a description of the change.
# This will be displayed on the codereview site.
# The first line will also be used as the subject of the review.
Add the necessary commands to docs/mac_build_instructions.md
If don't run autoninja -C out/Default unit_tests, you will get the following error:
`zsh
$ out/Default/unit_tests --gtest_filter="PushClientTest.*"
zsh: no such file or directory: out/Default/unit_tests
`
AUTHORS | 1 +
docs/mac_build_instructions.md | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
Waiting for editor...
saving CL description to /Users/wafuwafu13/depot_tools/.git_cl_description_backup
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 10 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 723 bytes | 24.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4)
remote: Counting objects: 96, done
remote: Processing changes: refs: 1, new: 1, done
remote:
remote: SUCCESS
remote:
remote:
* new reference 152b1036863451cc6985e191bd15df50d9bd7d3b -> refs/for/refs/heads/main%wip,m=Initial_upload,cc=chromium-reviews@chromium.org,cc=mac-reviews@chromium.org code: zsh
$ git add .
$ git commit -a
$ git rebase -i @{u}
pick 0d832da975946 Add the necessary commands to docs/mac_build_instructions.md
pick 7cea55b207d46 Change section title
# Rebase 4785f75fe89ad..7cea55b207d46 onto 4785f75fe89ad (2 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
:wq
$ git rebase-update
$ git cl upload --bypass-hooks
$ git cl upload --bypass-hooks
AUTHORS | 1 +
docs/mac_build_instructions.md | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
saving CL description to /Users/wafuwafu13/depot_tools/.git_cl_description_backup
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 10 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 769 bytes | 24.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4)
remote: Processing changes: refs: 1, updated: 1, done
remote:
remote: SUCCESS
remote:
remote:
* new reference cd54c652c445511febb62ec812a35c918574e008 -> refs/for/refs/heads/main%notify=NONE,m=Change_section_title issue
git status高速化
code: zsh
~/chromium/src
$ sysctl -a | egrep kern\..*vnodes
zsh: no matches found: kern..*vnodes
~/chromium/src
$ sudo sysctl kern.maxvnodes=$((512*1024))
Password:
Sorry, try again.
Password:
kern.maxvnodes: 251116 -> 524288
~/chromium/src
$ echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf
kern.maxvnodes=524288
issue
sync
ブランチが違う方向向くのでgit pull; gclient sync -D
code: zsh
~/chromium/src
$ git rebase-update
Fetching origin
remote: Finding sources: 100% (6902/6902)
remote: Total 6902 (delta 3972), reused 6733 (delta 3972)
Receiving objects: 100% (6902/6902), 86.93 MiB | 5.22 MiB/s, done.
Resolving deltas: 100% (3972/3972), completed with 1309 local objects.
3a957674cf677..66dd210a6f171 main -> origin/main
140426140c2c7..daa9ffadff6c3 lkgr -> origin/lkgr
eac0bc046e6aa..66dd210a6f171 lkgr-android-internal -> origin/lkgr-android-internal
* new tag 96.0.4664.125 -> 96.0.4664.125 * new tag 96.0.4664.126 -> 96.0.4664.126 * new tag 96.0.4664.127 -> 96.0.4664.127 * new tag 96.0.4664.128 -> 96.0.4664.128 * new tag 97.0.4692.65 -> 97.0.4692.65 * new tag 97.0.4692.66 -> 97.0.4692.66 * new tag 97.0.4692.67 -> 97.0.4692.67 * new tag 97.0.4692.68 -> 97.0.4692.68 * new tag 98.0.4758.22 -> 98.0.4758.22 * new tag 98.0.4758.23 -> 98.0.4758.23 * new tag 98.0.4758.24 -> 98.0.4758.24 * new tag 98.0.4758.25 -> 98.0.4758.25 * new tag 99.0.4784.0 -> 99.0.4784.0 * new tag 99.0.4784.1 -> 99.0.4784.1 * new tag 99.0.4784.2 -> 99.0.4784.2 * new tag 99.0.4785.0 -> 99.0.4785.0 * new tag 99.0.4785.1 -> 99.0.4785.1 * new tag 99.0.4786.0 -> 99.0.4786.0 * new tag 99.0.4786.1 -> 99.0.4786.1 * new tag 99.0.4787.0 -> 99.0.4787.0 * new tag 99.0.4787.1 -> 99.0.4787.1 * new tag 99.0.4788.0 -> 99.0.4788.0 * new tag 99.0.4788.1 -> 99.0.4788.1 * new tag 99.0.4789.0 -> 99.0.4789.0 * new tag 99.0.4789.1 -> 99.0.4789.1 * new tag 99.0.4789.2 -> 99.0.4789.2 * new tag 99.0.4790.0 -> 99.0.4790.0 * new tag 99.0.4790.1 -> 99.0.4790.1 Rebasing: mac-build-docs
Rebasing: main
Traceback (most recent call last):
File "/Users/wafuwafu13/depot_tools/git_rebase_update.py", line 352, in <module>
sys.exit(main())
File "/Users/wafuwafu13/depot_tools/git_rebase_update.py", line 320, in main
remove_empty_branches(branch_tree)
File "/Users/wafuwafu13/depot_tools/git_rebase_update.py", line 141, in remove_empty_branches
print(git.run('branch', '-d', branch))
File "/Users/wafuwafu13/depot_tools/git_common.py", line 747, in run
return run_with_stderr(*cmd, **kwargs)0 File "/Users/wafuwafu13/depot_tools/git_common.py", line 817, in run_with_stderr
raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
subprocess2.CalledProcessError: Command 'git -c color.ui=never branch -d mac-build-docs' returned non-zero exit status 1 in /Users/wafuwafu13/chromium/src
error: The branch 'mac-build-docs' is not fully merged.
If you are sure you want to delete it, run 'git branch -D mac-build-docs'.
~/chromium/src
$ git pull origin main
* branch main -> FETCH_HEAD
Already up to date.
issue
Here are some tips for writing good commit messages. まあいっか
git cl upload --bypass-hooks の事かく
issue
code: zsh
$ out/Default/unit_tests
12 tests failed:
AboutFlagsTest.EveryFlagHasMetadata (../../chrome/browser/about_flags_unittest.cc:85)
AppIconFactoryTest.LoadIconFromCompressedData (../../chrome/browser/apps/app_service/app_icon/app_icon_factory_unittest.cc:321)
NativeMessagingTest.EchoConnect (../../chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:276)
NativeMessagingTest.ReconnectArgs (../../chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:329)
NativeMessagingTest.ReconnectArgsIfNativeConnectionDisallowed (../../chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:411)
NativeMessagingTest.ReconnectArgs_Disabled (../../chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:384)
NativeMessagingTest.UserLevel (../../chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc:441)
PdfPrinterHandlerGetCapabilityTest.GetCapability (../../chrome/browser/ui/webui/print_preview/pdf_printer_handler_unittest.cc:264)
PdfPrinterHandlerGetCapabilityTest.GetMacCustomPaperSizesInCapabilities (../../chrome/browser/ui/webui/print_preview/pdf_printer_handler_unittest.cc:275)
TemplateURLServiceTest.RepairPrepopulatedSearchEngines (../../chrome/browser/search_engines/template_url_service_unittest.cc:962)
WebAppIconFactoryTest.LoadMaskableCompressedIcon (../../chrome/browser/apps/app_service/app_icon/app_icon_factory_unittest.cc:786)
WebAppIconFactoryTest.LoadNonMaskableCompressedIcon (../../chrome/browser/apps/app_service/app_icon/app_icon_factory_unittest.cc:711)
1 test crashed:
PreinstalledWebAppUtilsTest.GetTranslatedName (../../chrome/browser/web_applications/preinstalled_web_apps/preinstalled_web_app_definition_utils_unittest.cc:28)
Tests took 632 seconds.
issue
code: txt
Email display settings
There is a setting to control how your email address appears on comments and issues that you post.
Project members will always see your full email address. By default, other users who visit the site will see an abbreviated version of your email address.
If you do not wish your email address to be shared, there are other ways to get involved in the community. To report a problem when using the Chrome browser, you may use the "Report an issue..." item on the "Help" menu.
issue
issue
values_util.cc解読
issue
// TODO: Remove this hack which was introduced in 1.5.1
code: zsh
~/chromium/src
$ third_party/blink/tools/run_web_tests.py -t Default
Traceback (most recent call last):
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/web_tests/run_web_tests.py", line 751, in <module>
sys.exit(main(sys.argv1:, sys.stderr)) File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/web_tests/run_web_tests.py", line 61, in main
host = Host()
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/common/host.py", line 45, in __init__
SystemHost.__init__(self)
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/common/system/system_host.py", line 45, in __init__
self.user = User()
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/common/system/user.py", line 52, in __init__
self._platform_info = platform_info or PlatformInfo(
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/common/system/platform_info.py", line 58, in __init__
self.os_version = self._determine_mac_version(
File "/Users/wafuwafu13/chromium/src/third_party/blink/tools/blinkpy/common/system/platform_info.py", line 195, in _determine_mac_version
assert 11 <= major_release <= 11, 'Unsupported mac OS version: %s' % mac_version_string
AssertionError: Unsupported mac OS version: 12.1