Skip to content

Commit 6b1b375

Browse files
authored
Merge pull request #129 from rage/remove-heim
temporarily commented out usage of heim to fix CI error
2 parents 65eacc7 + 634a508 commit 6b1b375

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

tmc-langs-cli/src/app.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub fn create_app() -> App<'static, 'static> {
6868

6969
.subcommand(create_core_app()) // "core"
7070

71+
/*
7172
.subcommand(
7273
SubCommand::with_name("disk-space")
7374
.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> {
7778
.required(true)
7879
.takes_value(true))
7980
)
81+
*/
8082

8183
.subcommand(SubCommand::with_name("extract-project")
8284
.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 {
775777
]);
776778
}
777779

778-
#[test]
780+
// #[test]
779781
fn disk_space() {
780782
get_matches(&["disk-space", "--path", "path"]);
781783
}

tmc-langs-cli/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ fn run_app(matches: ArgMatches, pretty: bool) -> Result<()> {
282282
}
283283
}
284284
}
285+
/*
285286
("disk-space", Some(matches)) => {
286287
let path = matches.value_of("path").unwrap();
287288
let path = Path::new(path);
@@ -297,6 +298,7 @@ fn run_app(matches: ArgMatches, pretty: bool) -> Result<()> {
297298
);
298299
print_output(&output, pretty)?
299300
}
301+
*/
300302
("extract-project", Some(matches)) => {
301303
let archive_path = matches.value_of("archive-path").unwrap();
302304
let archive_path = Path::new(archive_path);

tmc-langs-cli/src/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub enum Data {
5555
},
5656
Validation(StyleValidationResult),
5757
/// megabytes
58-
FreeDiskSpace(u64),
58+
// FreeDiskSpace(u64),
5959
AvailablePoints(Vec<String>),
6060
Exercises(Vec<PathBuf>),
6161
ExercisePackagingConfiguration(ExercisePackagingConfiguration),

tmc-langs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tmc-langs-util = { path = "../tmc-langs-util" }
1313

1414
base64 = "0.13"
1515
dirs = "3"
16-
heim = { version = "0.1.0-beta.3", features = ["disk"] }
16+
# heim = { version = "0.1.0-beta.3", features = ["disk"] }
1717
impl-enum = "0.2"
1818
log = "0.4"
1919
lazy_static = "1"

tmc-langs/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ pub enum LangsError {
8383
Plugin(#[from] tmc_langs_plugins::PluginError),
8484
#[error(transparent)]
8585
FileError(#[from] tmc_langs_util::FileError),
86-
#[error(transparent)]
87-
Heim(#[from] heim::Error),
86+
// #[error(transparent)]
87+
// Heim(#[from] heim::Error),
8888
#[error(transparent)]
8989
WalkDir(#[from] walkdir::Error),
9090
#[error(transparent)]

tmc-langs/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub use tmc_langs_util::{
3737

3838
use crate::config::ProjectsConfig;
3939
use crate::data::DownloadTarget;
40-
use heim::disk;
40+
// use heim::disk;
4141
use oauth2::{
4242
basic::BasicTokenType, AccessToken, EmptyExtraTokenFields, Scope, StandardTokenResponse,
4343
};
@@ -666,6 +666,7 @@ pub fn compress_project_to(source: &Path, target: &Path) -> Result<(), LangsErro
666666
Ok(())
667667
}
668668

669+
/*
669670
/// Checks how many megabytes are available on the disk containing the target path.
670671
pub fn free_disk_space_megabytes(path: &Path) -> Result<u64, LangsError> {
671672
log::debug!("checking disk usage in {}", path.display());
@@ -675,6 +676,7 @@ pub fn free_disk_space_megabytes(path: &Path) -> Result<u64, LangsError> {
675676
.get::<heim::units::information::megabyte>();
676677
Ok(usage)
677678
}
679+
*/
678680

679681
/// Extracts the compressed project to the target location.
680682
pub fn extract_project(

0 commit comments

Comments
 (0)