知识卡片

普通读书笔记卡 · 6075.d.4

生成物检查把同步责任交给机器

理解等级:中级

版本控制中保存生成代码时,可在CI重新生成并比较差异,发现定义更新后漏提交产物。检查应固定生成工具与输入,让差异可解释;构建、文档和依赖检查也应有明确失败标准。覆盖率与基准属于测量,需历史和环境作参照,不能只看一次数值。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 5. Tooling CI Steps · 查看原书依据

      regenerates the resources and checks that there are no differences compared to the checked-in version. If your codebase includes platform-specific (e.g., #[cfg(target_arch = "arm")]) code, run CI steps that confirm that the code builds and (ideally) works on that platform. (The former is easier than the latter because the Rust toolchain includes support for

    参考来源

    - 位置:《Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)》第5章《CI Steps》(spine9;extracted/Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)/_epub-src/OEBPS/ch05.html;u163-ch05-034)。 - 结论依据:原文在“regenerates the resources”附近的定义、例子或代码支撑本卡核心说明:版本控制中保存生成代码时,可在CI重新生成并比较差异,发现定义更新后漏提交产物。边界按已读前提解释;示例未执行。 - 原始内容:regenerates the resources and checks that there are no differences compared to the checked-in version. If your codebase includes platform-specific (e.g., #[cfg(target_arch = "arm")]) code, run CI steps that confirm that the code builds and (ideally) works on that platform. (The former is easier than the latter because the Rust toolchain includes support for