apply_patch_toml.sh: reverse-check probe prints 'patch does not apply' errors on every fresh configure
维护者通常 5 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- cmake, git, shell
- 领域
- build-system
调研方向
打开 cmake/patches/apply_patch_toml.sh,检查它如何判断 tomlplusplus 补丁是否已经应用;同时阅读 cmake/toml.cmake 中相关的 guard。执行一次全新的 configure,再执行第二次 configure,以验证补丁应用时不会出现 probe 错误、仍然具有幂等性,并且仍会报告真实的应用失败。
由索引模型根据 Issue 内容生成。
描述
Summary
cmake/patches/apply_patch_toml.sh prints four error: lines on every fresh configure, even though everything works correctly:
[ 44%] Performing patch step for 'tomlplusplus-populate'
error: patch failed: include/toml++/impl/make_node.h:134
error: include/toml++/impl/make_node.h: patch does not apply
error: patch failed: CMakeLists.txt:31
error: CMakeLists.txt: patch does not apply
Cause
The script answers the question "was the patch already applied?" by attempting a reverse apply:
if ! git apply -R --ignore-whitespace ${TOML_PATCH} --check; then git apply --ignore-whitespace ${TOML_PATCH}; fi
git apply -R --check fails loudly when the patch is not yet applied — which is the normal case on every fresh FetchContent clone. The errors come from the probe, not from the actual application (which succeeds silently right after). Downstream consumers see scary patch does not apply errors in otherwise green build logs (we hit this building RediSearch → VectorSimilarity → SVS, and spent time confirming the patch was in fact applied).
Suggested fix
Probe the state instead of reverse-applying — the TOMLPLUSPLUS_INSTALL option that the patch itself adds to CMakeLists.txt is proof of appliedness:
if ! grep -q TOMLPLUSPLUS_INSTALL CMakeLists.txt; then git apply --ignore-whitespace ${TOML_PATCH}; fi
- Same idempotence for CMake re-configures (the case the script guards against, per the comment in
cmake/toml.cmake). - Nothing is silenced: the real
git applykeeps its stderr, so a genuinely failing patch still surfaces. - Verified against a fresh
marzer/tomlplusplusclone atv3.3.0: first run applies the patch with zero output, second run skips with zero output.
Happy to open a PR if you'd take one.
- 主要语言
- C++
- 星标
- 241
- 派生
- 48
- 平均合并
- 4 天 21 小时
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
intel/ScalableVectorSearch 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 42/100
intel/ScalableVectorSearch#469 ·
维护者通常 5 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 32/100
intel/ScalableVectorSearch#460 ·
维护者通常 5 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
intel/ScalableVectorSearch#438 ·
维护者通常 5 天内回复
-
CI: tier the test matrix into PR / main / nightly to cut Actions minutes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 32/100
intel/ScalableVectorSearch#432 · 1 条评论 ·
维护者通常 5 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
intel/ScalableVectorSearch#427 ·
维护者通常 5 天内回复
查看 intel/ScalableVectorSearch 的全部 Issue
相似的 Issue
-
runtime: lf_f128_mod is documented as fmodq (truncating) but implements floor-based modulo; unused未关闭internal correctness low priority rt_lib
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 87/100
-
PriorityNotificationQueue::wakeUpAll() loses the wake-up for a thread that is not waiting yet可能已有人在做 @matejk 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
pocoproject/poco#5674 ·
维护者通常 2 天内回复
-
bug docs GUI
难度 2/5 1-3 小时 新手友好度 62/100
sonic-pi-net/sonic-pi#3609 ·
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
SanderMertens/flecs#2395 ·
维护者通常 1 天内回复