-
Notifications
You must be signed in to change notification settings - Fork 103
Apps, second attempt #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Apps, second attempt #1211
Changes from all commits
35407c4
f420491
414559e
5e0bf3c
501e3b6
50ea0b6
d110cae
07018fa
0fc1554
93785f1
cf6910c
bb3f735
a2257dc
38b97bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,10 @@ | ||||||||||||||||||||||
use anyhow::{Context, Result}; | ||||||||||||||||||||||
use clap::Parser; | ||||||||||||||||||||||
use juliaup::cli::{ConfigSubCmd, Juliaup, OverrideSubCmd, SelfSubCmd}; | ||||||||||||||||||||||
use juliaup::cli::{ApplicationSubCmd, ConfigSubCmd, Juliaup, OverrideSubCmd, SelfSubCmd}; | ||||||||||||||||||||||
use juliaup::command_api::run_command_api; | ||||||||||||||||||||||
use juliaup::command_app_register::run_command_app_register; | ||||||||||||||||||||||
use juliaup::command_app_run::run_command_app_run; | ||||||||||||||||||||||
use juliaup::command_app_remove::run_command_app_remove; | ||||||||||||||||||||||
use juliaup::command_completions::run_command_completions; | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||
#[cfg(not(windows))] | ||||||||||||||||||||||
use juliaup::command_config_symlinks::run_command_config_symlinks; | ||||||||||||||||||||||
|
@@ -149,5 +152,14 @@ fn main() -> Result<()> { | |||||||||||||||||||||
SelfSubCmd::Uninstall {} => run_command_selfuninstall_unavailable(), | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
Juliaup::Completions { shell } => run_command_completions(shell), | ||||||||||||||||||||||
Juliaup::Application(subcmd) => match subcmd { | ||||||||||||||||||||||
ApplicationSubCmd::Register { value } => { | ||||||||||||||||||||||
run_command_app_register(&value, &paths) | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
ApplicationSubCmd::Run { name, args } => { | ||||||||||||||||||||||
run_command_app_run(&name, &args, &paths) | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
ApplicationSubCmd::Remove { name } => run_command_app_remove(&name, &paths) | ||||||||||||||||||||||
Comment on lines
+156
to
+162
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||
}, | ||||||||||||||||||||||
} | ||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -57,6 +57,9 @@ pub enum Juliaup { | |||||||||||
#[cfg(feature = "selfupdate")] | ||||||||||||
#[clap(name = "4c79c12db1d34bbbab1f6c6f838f423f", hide = true)] | ||||||||||||
SecretSelfUpdate {}, | ||||||||||||
#[clap(subcommand, name = "app")] | ||||||||||||
/// Juliaup applications | ||||||||||||
Application(ApplicationSubCmd), | ||||||||||||
} | ||||||||||||
|
||||||||||||
#[derive(Parser)] | ||||||||||||
|
@@ -158,3 +161,23 @@ pub enum ConfigSubCmd { | |||||||||||
value: Option<i64>, | ||||||||||||
}, | ||||||||||||
} | ||||||||||||
|
||||||||||||
#[derive(Parser)] | ||||||||||||
pub enum ApplicationSubCmd { | ||||||||||||
#[clap(name = "register")] | ||||||||||||
/// Register a Julia application | ||||||||||||
Register { | ||||||||||||
value: String | ||||||||||||
}, | ||||||||||||
Comment on lines
+169
to
+171
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||
#[clap(name = "run")] | ||||||||||||
/// Run a Julia application | ||||||||||||
Run { | ||||||||||||
name: String, | ||||||||||||
args: Vec<String> | ||||||||||||
}, | ||||||||||||
Comment on lines
+174
to
+177
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||
#[clap(name = "remove", alias = "rm")] | ||||||||||||
/// Remove a Julia application | ||||||||||||
Remove { | ||||||||||||
name: String | ||||||||||||
} | ||||||||||||
Comment on lines
+180
to
+182
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,86 @@ | ||||||||||||||||||||||||||||||||||
use std::fs; | ||||||||||||||||||||||||||||||||||
use std::path::PathBuf; | ||||||||||||||||||||||||||||||||||
use std::str::FromStr; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
use crate::config_file::{load_mut_config_db, save_config_db, JuliaupConfigApplication, JuliaupConfigExcutionAlias}; | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
use crate::global_paths::GlobalPaths; | ||||||||||||||||||||||||||||||||||
use crate::operations::install_version; | ||||||||||||||||||||||||||||||||||
use crate::versions_file::load_versions_db; | ||||||||||||||||||||||||||||||||||
use anyhow::{Context, Result}; | ||||||||||||||||||||||||||||||||||
use bstr::ByteVec; | ||||||||||||||||||||||||||||||||||
use normpath::PathExt; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
pub fn run_command_app_register(path: &str, paths: &GlobalPaths) -> Result<()> { | ||||||||||||||||||||||||||||||||||
let app_folder_path = PathBuf::from(path); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let project_path = app_folder_path.join("Project.toml"); | ||||||||||||||||||||||||||||||||||
let manifest_path = app_folder_path.join("Manifest.toml"); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let project_content = fs::read_to_string(project_path).unwrap(); | ||||||||||||||||||||||||||||||||||
let project_parsed = toml_edit::DocumentMut::from_str(&project_content).unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let manifest_content = fs::read_to_string(&manifest_path).unwrap(); | ||||||||||||||||||||||||||||||||||
let manifest_parsed = toml_edit::DocumentMut::from_str(&manifest_content).unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let app_name = project_parsed.as_table().get_key_value("name").unwrap().1.as_str().unwrap(); | ||||||||||||||||||||||||||||||||||
let julia_version = manifest_parsed.as_table().get_key_value("julia_version").unwrap().1.as_str().unwrap(); | ||||||||||||||||||||||||||||||||||
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let exec_aliases: Vec<(String, String)> = project_parsed | ||||||||||||||||||||||||||||||||||
.as_table() | ||||||||||||||||||||||||||||||||||
.get_key_value("executionaliases") | ||||||||||||||||||||||||||||||||||
.unwrap() | ||||||||||||||||||||||||||||||||||
.1 | ||||||||||||||||||||||||||||||||||
.clone() | ||||||||||||||||||||||||||||||||||
.into_table() | ||||||||||||||||||||||||||||||||||
.unwrap() | ||||||||||||||||||||||||||||||||||
.iter() | ||||||||||||||||||||||||||||||||||
.map(|i| (i.0.to_string(), i.1.clone().into_value().unwrap().as_str().unwrap().to_string())) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
.collect(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let version_db = | ||||||||||||||||||||||||||||||||||
load_versions_db(paths).with_context(|| "`add app` command failed to load versions db.")?; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let asdf = version_db.available_channels.get(julia_version).unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let mut config_file = load_mut_config_db(paths) | ||||||||||||||||||||||||||||||||||
.with_context(|| "`app add` command failed to load configuration data.")?; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
install_version(&asdf.version, &mut config_file.data, &version_db, paths).unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let julia_binary_path = &paths.juliaupconfig | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
.parent() | ||||||||||||||||||||||||||||||||||
.unwrap() // unwrap OK because there should always be a parent | ||||||||||||||||||||||||||||||||||
.join(config_file.data.installed_versions.get(&asdf.version).unwrap().path.clone()) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
.join("bin") | ||||||||||||||||||||||||||||||||||
.join(format!("julia{}", std::env::consts::EXE_SUFFIX)) | ||||||||||||||||||||||||||||||||||
.normalize().unwrap(); | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let depot_detection_output = std::process::Command::new(julia_binary_path) | ||||||||||||||||||||||||||||||||||
.arg("-e") | ||||||||||||||||||||||||||||||||||
.arg("println(Base.DEPOT_PATH[1])") | ||||||||||||||||||||||||||||||||||
.output() | ||||||||||||||||||||||||||||||||||
.unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
let depot_detection_output = depot_detection_output.stdout.into_string().unwrap().trim().to_string(); | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
config_file.data.installed_apps.insert( | ||||||||||||||||||||||||||||||||||
app_name.to_string(), | ||||||||||||||||||||||||||||||||||
JuliaupConfigApplication::DevedApplication { | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
path: app_folder_path.to_str().unwrap().to_string(), | ||||||||||||||||||||||||||||||||||
julia_version: asdf.version.to_string(), | ||||||||||||||||||||||||||||||||||
julia_depot: depot_detection_output, | ||||||||||||||||||||||||||||||||||
execution_aliases: exec_aliases.iter().map(|i| (i.0.clone(), JuliaupConfigExcutionAlias { target: i.1.to_string() })).collect() | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
Comment on lines
+72
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
save_config_db(&mut config_file).unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
std::process::Command::new(julia_binary_path) | ||||||||||||||||||||||||||||||||||
.env("JULIA_PROJECT", &app_folder_path) | ||||||||||||||||||||||||||||||||||
.arg("-e") | ||||||||||||||||||||||||||||||||||
.arg("using Pkg; Pkg.instantiate()") | ||||||||||||||||||||||||||||||||||
.status() | ||||||||||||||||||||||||||||||||||
.unwrap(); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return Ok(()) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,21 @@ | ||||||||||||||
use anyhow::{Context,Result}; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
use crate::{config_file::{load_mut_config_db, save_config_db}, global_paths::GlobalPaths, operations::garbage_collect_versions}; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
pub fn run_command_app_remove(name: &str, paths: &GlobalPaths) -> Result<()> { | ||||||||||||||
let mut config_file = load_mut_config_db(paths) | ||||||||||||||
.with_context(|| "`app remove` command failed to load configuration data.")?; | ||||||||||||||
|
||||||||||||||
if !config_file.data.installed_apps.contains_key(name) { | ||||||||||||||
println!("Unknown app {}.", name); | ||||||||||||||
} | ||||||||||||||
else { | ||||||||||||||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
config_file.data.installed_apps.remove(name).unwrap(); | ||||||||||||||
|
||||||||||||||
garbage_collect_versions(false, &mut config_file.data, paths).unwrap(); | ||||||||||||||
|
||||||||||||||
save_config_db(&mut config_file).unwrap(); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
return Ok(()) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
use std::collections::HashMap; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
use crate::{config_file::{load_config_db, JuliaupConfigApplication}, global_paths::GlobalPaths}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
use anyhow::{Context,Result}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
use normpath::PathExt; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pub fn run_command_app_run(name: &str, args: &Vec<String>, paths: &GlobalPaths) -> Result<()> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let config_file = load_config_db(paths, None) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.with_context(|| "`app run` command failed to load configuration data.")?; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let target: HashMap<String,(String,String,String,String)> = config_file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.installed_apps | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.iter() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.flat_map(|i| match&i.1 { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JuliaupConfigApplication::DevedApplication { path, julia_version, julia_depot, execution_aliases } => execution_aliases.iter().map(|j| (j.0.clone(), (j.1.target.clone(), path.clone(), julia_version.clone(), julia_depot.clone()))) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.map(|i| (i.0.clone(), (i.1.0.clone(), i.1.1.clone(), i.1.2.clone(), i.1.3.clone()))) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.collect(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if target.contains_key(name) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let foo = target.get(name).unwrap(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let parts: Vec<&str> = foo.0.split(".").collect(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// println!("First arg {}, second arg {}", foo.0, foo.1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let target_path = foo.1.clone(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let julia_binary_path = &paths.juliaupconfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.parent() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.unwrap() // unwrap OK because there should always be a parent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.join(config_file.data.installed_versions.get(&foo.2).unwrap().path.clone()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.join("bin") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.join(format!("julia{}", std::env::consts::EXE_SUFFIX)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.normalize().unwrap(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::process::Command::new(julia_binary_path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.arg(format!("--project={}", target_path)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// .env("JULIA_PROJECT", target_path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.env("JULIA_DEPOT_PATH", foo.3.clone()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.arg("-e") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.arg(format!("import {}; {}(ARGS)", parts[0], foo.0)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.args(args) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.status() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.unwrap(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+48
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
println!("Could not find app."); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return Ok(()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [rustfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rustfmt] reported by reviewdog 🐶