fix(builder): force ninja response files for win32 cmdline limits, fix git cache repo name detection

This commit is contained in:
Дмитрий committed 2026-11-03 17:50:44 +05:00
1 parent 4ebf86d222
commit fb55eb97a9
2 files changed
+17 -4

No files matched your search

+16 -4
View File
@@ -397,10 +397,22 @@ pub fn validate_source_tree_safety(root_dir: &Path) -> Result<()> {
pub fn analyze_repository_with_contract(repo_path: &Path, contract: &SdkExportContract) -> Result<CompatibilityReport> {
validate_source_tree_safety(repo_path)?;
let repo_path_buf = repo_path.canonicalize().unwrap_or_else(|_| repo_path.to_path_buf());
let repo_name = repo_path_buf
.file_name()
.map(|n| n.to_string_lossy().into_owned())
.unwrap_or_else(|| "unknown".into());
let repo_name = {
let name = repo_path_buf
.file_name()
.map(|n| n.to_string_lossy().into_owned())
.unwrap_or_else(|| "unknown".into());
// If the path leaf is a git commit hash (e.g. in github_cache), use the parent directory as repo_name
if name.len() >= 7 && name.chars().all(|c| c.is_ascii_hexdigit()) {
repo_path_buf
.parent()
.and_then(|p| p.file_name())
.map(|n| n.to_string_lossy().into_owned())
.unwrap_or(name)
} else {
name
}
};
let mut findings = Vec::new();
let mut hooks = Vec::new();
+1
View File
@@ -569,6 +569,7 @@ pub fn build_module_from_source(
let controlled_cmake = format!(r#"cmake_minimum_required(VERSION 3.22)
project(coa_plugin_{safe_target_name} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_NINJA_FORCE_RESPONSE_FILE ON)
string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${{CMAKE_CXX_FLAGS_RELWITHDEBINFO}}")
string(REPLACE "-Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${{CMAKE_CXX_FLAGS_RELWITHDEBINFO}}")