apply_patch_toml.sh: reverse-check probe prints 'patch does not apply' errors on every fresh configure
Les mainteneurs répondent en général sous 5 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Accessibilité débutants
- 88/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- cmake, git, shell
- Domaine
- build-system
Piste de recherche
Ouvrez cmake/patches/apply_patch_toml.sh et examinez comment il vérifie si le patch tomlplusplus a déjà été appliqué ; lisez également la guard correspondante dans cmake/toml.cmake. Effectuez une configuration vierge, puis une deuxième configuration, afin de vérifier que le patch s’applique sans erreurs de sonde, reste idempotent et signale toujours les véritables échecs d’application.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- C++
- Étoiles
- 241
- Forks
- 48
- Merge moyen
- 4 j 21 h
- PR mergées (30 j)
- 11
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de intel/ScalableVectorSearch
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
intel/ScalableVectorSearch#469 ·
Les mainteneurs répondent en général sous 5 jours
-
Add CI test for C API on ARMOuverteenhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 32/100
intel/ScalableVectorSearch#460 ·
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
intel/ScalableVectorSearch#438 ·
Les mainteneurs répondent en général sous 5 jours
-
CI: tier the test matrix into PR / main / nightly to cut Actions minutesPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 32/100
intel/ScalableVectorSearch#432 · 1 commentaire ·
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
intel/ScalableVectorSearch#427 ·
Les mainteneurs répondent en général sous 5 jours
Toutes les issues de intel/ScalableVectorSearch
Issues similaires
-
runtime: lf_f128_mod is documented as fmodq (truncating) but implements floor-based modulo; unusedOuverteinternal correctness low priority rt_lib
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 87/100
-
PriorityNotificationQueue::wakeUpAll() loses the wake-up for a thread that is not waiting yetPeut-être pris @matejk l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
pocoproject/poco#5674 ·
Les mainteneurs répondent en général sous 2 jours
-
bug docs GUI
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
sonic-pi-net/sonic-pi#3609 ·
-
Unreachable code warningOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
SanderMertens/flecs#2395 ·
Les mainteneurs répondent en général sous 1 jour