Skip to content

Commit

Permalink
temp commit for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
randommm committed Feb 18, 2024
1 parent c9d1d95 commit de7456e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rust/src/download_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,16 @@ where
None => get_bridgestan_src()?,
};

println!("DEBUG WINDOWS stan_file: {:?}", stan_file.as_ref());
let stan_file = fs::canonicalize(stan_file)
.map_err(|e| BridgeStanError::ModelCompilingFailed(e.to_string()))?;

println!("DEBUG WINDOWS stan_file: {:?}", stan_file);
if stan_file.extension().unwrap_or_default() != "stan" {
return Err(BridgeStanError::ModelCompilingFailed(
"File must be a .stan file".to_owned(),
));
}
println!("DEBUG WINDOWS stan_file: {:?}", stan_file);

// add _model suffix and change extension to .so
let output = stan_file.with_extension("");
Expand All @@ -97,6 +99,7 @@ where
output.file_name().unwrap_or_default().to_string_lossy()
));
let output = output.with_extension("so");
println!("DEBUG WINDOWS output: {:?}", output);

let stanc_args = [["--include-paths=."].as_slice(), stanc_args.as_slice()].concat();
let stanc_args = stanc_args.join(" ");
Expand All @@ -109,6 +112,7 @@ where
stanc_args.as_slice(),
]
.concat();
println!("DEBUG WINDOWS cmd: {:?}", cmd);

println!("Compiling model");
let proc = std::process::Command::new("make")
Expand Down

0 comments on commit de7456e

Please sign in to comment.