diff --git a/tmc-langs-cli/src/app.rs b/tmc-langs-cli/src/app.rs index 011dc9d99df..120ee78667c 100644 --- a/tmc-langs-cli/src/app.rs +++ b/tmc-langs-cli/src/app.rs @@ -68,6 +68,7 @@ pub fn create_app() -> App<'static, 'static> { .subcommand(create_core_app()) // "core" + /* .subcommand( SubCommand::with_name("disk-space") .about("Returns the amount of free disk space in megabytes left on the partition that contains the given path") @@ -77,6 +78,7 @@ pub fn create_app() -> App<'static, 'static> { .required(true) .takes_value(true)) ) + */ .subcommand(SubCommand::with_name("extract-project") .about("Extracts an exercise from a ZIP archive. If the output-path is a project root, the plugin's student file policy will be used to avoid overwriting student files") @@ -775,7 +777,7 @@ mod base_test { ]); } - #[test] + // #[test] fn disk_space() { get_matches(&["disk-space", "--path", "path"]); } diff --git a/tmc-langs-cli/src/lib.rs b/tmc-langs-cli/src/lib.rs index 706a65207ef..15a98db8f5d 100644 --- a/tmc-langs-cli/src/lib.rs +++ b/tmc-langs-cli/src/lib.rs @@ -282,6 +282,7 @@ fn run_app(matches: ArgMatches, pretty: bool) -> Result<()> { } } } + /* ("disk-space", Some(matches)) => { let path = matches.value_of("path").unwrap(); let path = Path::new(path); @@ -297,6 +298,7 @@ fn run_app(matches: ArgMatches, pretty: bool) -> Result<()> { ); print_output(&output, pretty)? } + */ ("extract-project", Some(matches)) => { let archive_path = matches.value_of("archive-path").unwrap(); let archive_path = Path::new(archive_path); diff --git a/tmc-langs-cli/src/output.rs b/tmc-langs-cli/src/output.rs index ae8d6cb5c3a..644cf4783ab 100644 --- a/tmc-langs-cli/src/output.rs +++ b/tmc-langs-cli/src/output.rs @@ -55,7 +55,7 @@ pub enum Data { }, Validation(StyleValidationResult), /// megabytes - FreeDiskSpace(u64), + // FreeDiskSpace(u64), AvailablePoints(Vec), Exercises(Vec), ExercisePackagingConfiguration(ExercisePackagingConfiguration), diff --git a/tmc-langs/Cargo.toml b/tmc-langs/Cargo.toml index 5b94c8dcbe0..3c04f180ef0 100644 --- a/tmc-langs/Cargo.toml +++ b/tmc-langs/Cargo.toml @@ -13,7 +13,7 @@ tmc-langs-util = { path = "../tmc-langs-util" } base64 = "0.13" dirs = "3" -heim = { version = "0.1.0-beta.3", features = ["disk"] } +# heim = { version = "0.1.0-beta.3", features = ["disk"] } impl-enum = "0.2" log = "0.4" lazy_static = "1" diff --git a/tmc-langs/src/error.rs b/tmc-langs/src/error.rs index 18a4363465e..f9be4692caa 100644 --- a/tmc-langs/src/error.rs +++ b/tmc-langs/src/error.rs @@ -83,8 +83,8 @@ pub enum LangsError { Plugin(#[from] tmc_langs_plugins::PluginError), #[error(transparent)] FileError(#[from] tmc_langs_util::FileError), - #[error(transparent)] - Heim(#[from] heim::Error), + // #[error(transparent)] + // Heim(#[from] heim::Error), #[error(transparent)] WalkDir(#[from] walkdir::Error), #[error(transparent)] diff --git a/tmc-langs/src/lib.rs b/tmc-langs/src/lib.rs index 4796ed688fa..b591cede953 100644 --- a/tmc-langs/src/lib.rs +++ b/tmc-langs/src/lib.rs @@ -37,7 +37,7 @@ pub use tmc_langs_util::{ use crate::config::ProjectsConfig; use crate::data::DownloadTarget; -use heim::disk; +// use heim::disk; use oauth2::{ basic::BasicTokenType, AccessToken, EmptyExtraTokenFields, Scope, StandardTokenResponse, }; @@ -666,6 +666,7 @@ pub fn compress_project_to(source: &Path, target: &Path) -> Result<(), LangsErro Ok(()) } +/* /// Checks how many megabytes are available on the disk containing the target path. pub fn free_disk_space_megabytes(path: &Path) -> Result { log::debug!("checking disk usage in {}", path.display()); @@ -675,6 +676,7 @@ pub fn free_disk_space_megabytes(path: &Path) -> Result { .get::(); Ok(usage) } +*/ /// Extracts the compressed project to the target location. pub fn extract_project(