Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions repo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions src-tauri/src/commands/runs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -279,6 +280,12 @@ pub async fn execute_analysis(
.clone()
.unwrap_or_else(|| "<unset>".to_string())
),
format!(
" JAVA_CMD (original) = {}",
original_java_cmd
.clone()
.unwrap_or_else(|| "<unset>".to_string())
),
];

let config = match biovault::config::get_config() {
Expand Down Expand Up @@ -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!(
Expand All @@ -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) = <unset>".to_string());
}
}
}

let nxf_home_path = biovault_home.join("data").join("nextflow");
match fs::create_dir_all(&nxf_home_path) {
Ok(_) => {
Expand All @@ -366,6 +397,10 @@ pub async fn execute_analysis(
" JAVA_HOME (effective) = {}",
env::var("JAVA_HOME").unwrap_or_else(|_| "<unset>".to_string())
));
env_lines.push(format!(
" JAVA_CMD (effective) = {}",
env::var("JAVA_CMD").unwrap_or_else(|_| "<unset>".to_string())
));
env_lines.push(format!(
" NXF_HOME (effective) = {}",
env::var("NXF_HOME").unwrap_or_else(|_| "<unset>".to_string())
Expand Down
Loading