今日英语表达 29/30 · 阶段:合并之后。 所有例句均为本文特意创作。并非摘录自实际代码库的评论,版本和编号均为示例。
目录
概览
| 表达 | This landed in main. / The fix will ship in v1.5.0. |
| 含义 | 已合并到 main / 此修复将随 v1.5.0 发布。 |
| 使用场景 | 关闭 Issue 时的评论、发布说明、Slack |
| 礼貌程度 | 中立。用于告知状态。 |
1. 含义与语感
land 的本意是“着陆”。在开发中,它引申为“更改通过了 Code Review 并进入了代码库的主分支”。Chromium 的贡献文档也提到,当提交信息对应的更改“landed 到 Chromium 树中”时会用到该词,并使用了“在父级更改 lands 到 main 之前”这样的说法。它既可以作为不及物动词 This landed,也可以作为及物动词 I landed the change。
合并之后最常收到的问题是:“那到底什么时候可以用?”此时, 应当区分合并与发布来进行说明。
- landed / merged: 已进入 main 分支。可能尚未发布。
- released / shipped: 已包含在发布中,用户可以使用。
- will be in / will ship in (版本): 预计将包含在下一个版本中。
如果混用这些词会引起误解。如果用户听到“修好了”就升级到当前版本,却发现依然存在 Bug,Issue 就会被重新打开,从而产生不必要的对话。因此,在关闭 Issue 时,最好同时写明 进入了哪个分支以及将在哪个版本发布。是否需要单独迁移到发布分支将在第 30 篇的 backport 中介绍。
2. 例句
情况 1:关闭 Issue 时
The fix landed in main via #4210 and will be included in v1.5.0. Closing this, but feel free to reopen if you still see the problem after upgrading.
via 表示“通过……”。feel free to reopen 表达了可以重新打开的许可,使关闭 Issue 的语气更加柔和。
情况 2:回答用户提问时
It's merged but not released yet. If you need it now, you can try the nightly build; otherwise it'll ship in the next minor release.
nightly build 是指每天晚上从 main 构建的测试版本。根据项目的不同,名称也会有所差异。
情况 3:在 Slack 中分享好消息时
My first PR to the project just landed! Thanks to everyone who reviewed it.
3. 类似表达与区别
- Merged. 最直接且不会产生误解。与 GitHub 界面上的状态名称相同。
- Shipped in v1.5.0. 意为已经随发布推出。用户从该版本开始可以使用。
- Available in v1.5.0 and later. 意为“可在 v1.5.0 及更高版本中使用”,是文档或 Release Notes 中使用的准确表达。
4. 韩国人常犯的错误
- It is reflected. 如果直译“反映了”,人们就无法得知究竟是什么被反映到了哪里、如何反映的(与第 17 篇中 reflect 的错误类似)。
- 修改后的句子:The fix has been merged into main.
- It is fixed. Please update. 如果尚未发布,用户将无版本可更新。
- 修改后的句子:It's fixed in main and will be in v1.5.0.
- This was merged in v1.5.0. 合并发生在分支上,而版本是发布的名称。当与版本连用时,使用 included 或 shipped 才准确。
- 修改后的句子:This is included in v1.5.0. 或 This shipped in v1.5.0.
5. 行练习
请将以下韩语句子改写为用于关闭 Issue 的评论。
此修复已合并到 main,并将包含在下一个补丁版本中。发布后请再次确认。
参考答案
This fix landed in main and will be part of the next patch release. Please give it a try once it's out.
be part of 是对“包含在……中”的自然翻译。once it's out 意为“一旦发布”,在不确切知道发布时间时非常适用。
Titi 的提示。 “进去了”和“发布了”是不同的。把这两个概念分开说明,就不会收到重复的提问。
参考资料
- Chromium, Contributing to Chromium(Committing): https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md
- Merriam-Webster, 「ship」: https://www.merriam-webster.com/dictionary/ship