diff --git a/repo b/repo index c99abdc..6d2f647 100755 --- a/repo +++ b/repo @@ -566,9 +566,19 @@ ensure_syqure_submodules() { echo -e "${CYAN}→ ${repo} submodules${NC}" git -C "$repo" submodule sync --recursive >/dev/null 2>&1 || true - if ! git -C "$repo" submodule update --init --recursive --depth 1; then - echo -e "${YELLOW}WARN: ${repo} shallow submodule update failed; retrying full depth${NC}" - if ! git -C "$repo" submodule update --init --recursive; then + git -C "$repo" config submodule.external/llvm-project.shallow true >/dev/null 2>&1 || true + git -C "$repo" config submodule.external/llvm-project.partialClone true >/dev/null 2>&1 || true + git -C "$repo" config submodule.external/llvm-project.partialCloneFilter blob:none >/dev/null 2>&1 || true + + # Keep llvm-project shallow because it is large. + if ! git -C "$repo" submodule update --init --depth 1 --filter=blob:none -- external/llvm-project; then + echo -e "${RED}✗ ${repo} llvm-project shallow submodule update failed${NC}" >&2 + return 1 + fi + + if ! git -C "$repo" submodule update --init --recursive --depth 1 -- codon sequre; then + echo -e "${YELLOW}WARN: ${repo} shallow codon/sequre update failed; retrying full depth${NC}" + if ! git -C "$repo" submodule update --init --recursive -- codon sequre; then echo -e "${RED}✗ ${repo} submodule update failed${NC}" >&2 return 1 fi diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a0d9b46..86082ed 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -598,7 +598,7 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "biovault" -version = "0.1.152" +version = "0.1.154" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/src-tauri/src/commands/runs.rs b/src-tauri/src/commands/runs.rs index 90cd5e5..6ecf428 100644 --- a/src-tauri/src/commands/runs.rs +++ b/src-tauri/src/commands/runs.rs @@ -257,6 +257,7 @@ pub async fn execute_analysis( // Capture original environment for logging let original_path = env::var("PATH").unwrap_or_default(); let original_java_home = env::var("JAVA_HOME").ok(); + let original_java_cmd = env::var("JAVA_CMD").ok(); let mut env_lines = vec![ "=== Nextflow environment ===".to_string(), @@ -279,6 +280,12 @@ pub async fn execute_analysis( .clone() .unwrap_or_else(|| "".to_string()) ), + format!( + " JAVA_CMD (original) = {}", + original_java_cmd + .clone() + .unwrap_or_else(|| "".to_string()) + ), ]; let config = match biovault::config::get_config() { @@ -319,8 +326,12 @@ pub async fn execute_analysis( } let mut java_home_set = false; + let mut java_cmd_set = false; if let Some(java_bin) = resolve_binary_path(config.as_ref(), "java") { env_lines.push(format!(" java binary = {}", java_bin)); + env::set_var("JAVA_CMD", &java_bin); + env_lines.push(format!(" JAVA_CMD set from java binary = {}", java_bin)); + java_cmd_set = true; if let Some(java_home) = derive_java_home(&java_bin) { env::set_var("JAVA_HOME", &java_home); env_lines.push(format!( @@ -345,6 +356,26 @@ pub async fn execute_analysis( } } + if !java_cmd_set { + match original_java_cmd.as_deref() { + Some(existing) => { + if std::path::Path::new(existing).exists() { + env_lines.push(format!(" JAVA_CMD retained (pre-existing) = {}", existing)); + } else { + env::remove_var("JAVA_CMD"); + env_lines.push(format!( + " JAVA_CMD removed (pre-existing path missing) = {}", + existing + )); + } + } + None => { + env::remove_var("JAVA_CMD"); + env_lines.push(" JAVA_CMD (effective) = ".to_string()); + } + } + } + let nxf_home_path = biovault_home.join("data").join("nextflow"); match fs::create_dir_all(&nxf_home_path) { Ok(_) => { @@ -366,6 +397,10 @@ pub async fn execute_analysis( " JAVA_HOME (effective) = {}", env::var("JAVA_HOME").unwrap_or_else(|_| "".to_string()) )); + env_lines.push(format!( + " JAVA_CMD (effective) = {}", + env::var("JAVA_CMD").unwrap_or_else(|_| "".to_string()) + )); env_lines.push(format!( " NXF_HOME (effective) = {}", env::var("NXF_HOME").unwrap_or_else(|_| "".to_string())