Checking Crates into Chromium Source Code
git status 应显示以下内容:
//third_party/rust/chromium_crates_io中的 crate 代码//third_party/rust/<crate>/<version>中的元数据(BUILD.gn和README.chromium)
此外,请在后面的位置添加 OWNERS 文件。
您应将所有这些内容,以及对 Cargo.toml 和 gnrt_config.toml 的更改一起提交到 Chromium 仓库中。
重要提示:您需要使用 git add -f 命令,否则 .gitignore 文件可能会导致某些文件被跳过。
在此过程中,您可能会发现由于使用了非包容性语言,导致提交前检查失败。这是因为 Rust crate 数据往往包含 git 分支的名称,而许多项目仍然在使用非包容性术语。因此,您需要运行以下命令:
infra/update_inclusive_language_presubmit_exempt_dirs.sh > infra/inclusive_language_presubmit_exempt_dirs.txt
git add -p infra/inclusive_language_presubmit_exempt_dirs.txt # add whatever changes are yours