From 50807533e4bd9d43ff9ced8631dad3177918d36c Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Mon, 31 Aug 2026 09:38:40 +1200 Subject: [PATCH 1/3] [ML] Fail CMake configure if Eigen git clone fails Previously, execute_process() silently ignored a non-zero exit from the git clone command. If the GitLab server is unavailable or overloaded, CMake would continue configuring with no Eigen headers present, leading to a cryptic compiler error hundreds of lines later instead of a clear configure-time failure. Co-Authored-By: Claude Sonnet 4.6 --- 3rd_party/pull-eigen.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/3rd_party/pull-eigen.cmake b/3rd_party/pull-eigen.cmake index adcfc7a1bc..5dda6f67b4 100644 --- a/3rd_party/pull-eigen.cmake +++ b/3rd_party/pull-eigen.cmake @@ -42,5 +42,9 @@ if(PULL_EIGEN) execute_process( COMMAND git -c advice.detachedHead=false clone --depth=1 --branch=3.4.0 https://gitlab.com/libeigen/eigen.git WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + RESULT_VARIABLE GIT_RESULT ) + if(NOT GIT_RESULT EQUAL 0) + message(FATAL_ERROR "Failed to clone Eigen: git exited with ${GIT_RESULT}. Check network access to gitlab.com.") + endif() endif() From f9aa3082e42898f033c1a0007edaefd16afcd075 Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Mon, 31 Aug 2026 09:46:58 +1200 Subject: [PATCH 2/3] [ML] Fail CMake configure if Valijson git clone fails Same hardening as pull-eigen.cmake: report a clear configure-time error if the git clone fails rather than silently continuing and producing a cryptic compiler error later. Co-Authored-By: Claude Sonnet 4.6 --- 3rd_party/pull-valijson.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/3rd_party/pull-valijson.cmake b/3rd_party/pull-valijson.cmake index 13f6e3e408..54674d97f4 100644 --- a/3rd_party/pull-valijson.cmake +++ b/3rd_party/pull-valijson.cmake @@ -16,5 +16,12 @@ # This cmake script is expected to be called from a target or custom command with WORKING_DIRECTORY set to this file's location if ( NOT EXISTS valijson ) - execute_process( COMMAND git -c advice.detachedHead=false clone --depth=1 --branch=v1.0.2 https://github.com/tristanpenman/valijson.git WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) + execute_process( + COMMAND git -c advice.detachedHead=false clone --depth=1 --branch=v1.0.2 https://github.com/tristanpenman/valijson.git + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + RESULT_VARIABLE GIT_RESULT + ) + if(NOT GIT_RESULT EQUAL 0) + message(FATAL_ERROR "Failed to clone Valijson: git exited with ${GIT_RESULT}. Check network access to github.com.") + endif() endif() From 50a1ac9aabddb19a327e43dba446a5cfbc29668e Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Mon, 31 Aug 2026 14:18:38 +1200 Subject: [PATCH 3/3] [ML] Broaden git clone error messages to include URL and all failure causes Address Copilot review: include the clone URL in the error message and replace "Check network access to X" with "Check network connectivity, proxy settings, and git availability" since git clone can fail for reasons beyond simple network access. Co-Authored-By: Claude Sonnet 4.6 --- 3rd_party/pull-eigen.cmake | 2 +- 3rd_party/pull-valijson.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3rd_party/pull-eigen.cmake b/3rd_party/pull-eigen.cmake index 5dda6f67b4..1a76f5a8c5 100644 --- a/3rd_party/pull-eigen.cmake +++ b/3rd_party/pull-eigen.cmake @@ -45,6 +45,6 @@ if(PULL_EIGEN) RESULT_VARIABLE GIT_RESULT ) if(NOT GIT_RESULT EQUAL 0) - message(FATAL_ERROR "Failed to clone Eigen: git exited with ${GIT_RESULT}. Check network access to gitlab.com.") + message(FATAL_ERROR "Failed to clone Eigen from https://gitlab.com/libeigen/eigen.git: git exited with ${GIT_RESULT}. Check network connectivity, proxy settings, and git availability.") endif() endif() diff --git a/3rd_party/pull-valijson.cmake b/3rd_party/pull-valijson.cmake index 54674d97f4..c80d4838d6 100644 --- a/3rd_party/pull-valijson.cmake +++ b/3rd_party/pull-valijson.cmake @@ -22,6 +22,6 @@ if ( NOT EXISTS valijson ) RESULT_VARIABLE GIT_RESULT ) if(NOT GIT_RESULT EQUAL 0) - message(FATAL_ERROR "Failed to clone Valijson: git exited with ${GIT_RESULT}. Check network access to github.com.") + message(FATAL_ERROR "Failed to clone Valijson from https://github.com/tristanpenman/valijson.git: git exited with ${GIT_RESULT}. Check network connectivity, proxy settings, and git availability.") endif() endif()