知识卡片

普通读书笔记卡 · 6076.b.1.a

独立功能增加配置验证成本

理解等级:高级

N个独立布尔功能理论上形成2^N种组合,依赖关系会缩小可达集合。测试默认和全开不等于验证所有组合,应列出支持配置与关键交互,并按资源安排矩阵。功能有助降低依赖与支持no_std,但每个开关都增加接口和验证责任。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 4. Dependencies Features · 查看原书依据

      all of the 2N possible build combinations can occur in practice. To avoid unpleasant surprises, it’s a good idea to ensure that your CI system (Item 32) covers all of these 2N combinations, in all of the available test variants (Item 30). However, the use of optional features is very helpful in controlling exposure to an expanded dependency graph (Item 25).

    参考来源

    - 位置:《Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)》第4章《Features》(spine8;extracted/Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)/_epub-src/OEBPS/ch04.html;u131-ch04-025)。 - 结论依据:原文在“all of the 2”附近的定义、例子或代码支撑本卡核心说明:N个独立布尔功能理论上形成2^N种组合,依赖关系会缩小可达集合。边界按已读前提解释;示例未执行。 - 原始内容:all of the 2N possible build combinations can occur in practice. To avoid unpleasant surprises, it’s a good idea to ensure that your CI system (Item 32) covers all of these 2N combinations, in all of the available test variants (Item 30). However, the use of optional features is very helpful in controlling exposure to an expanded dependency graph (Item 25).