Skip to content

Commit

Permalink
reordering inports
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Sep 20, 2024
1 parent 1657d64 commit 36509d6
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 39 deletions.
6 changes: 2 additions & 4 deletions src/backends/cmake_c.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use std::fs;
use std::io::Write;

use std::process::Command;

use crate::util::execute_command_to_build_result;
use crate::App;

use crate::backends::{
BatchBackend, BatchBuildResults, BuildCommandOptions, BuildProfile, BuildResult, CommandSpec,
};
use crate::util::errors::LingoError;
use crate::util::execute_command_to_build_result;
use crate::App;

pub struct CmakeC;

Expand Down
15 changes: 7 additions & 8 deletions src/backends/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use crate::package::OUTPUT_DIRECTORY;
use log::error;
use rayon::prelude::*;

use std::collections::HashMap;
use std::path::PathBuf;

use log::error;
use std::sync::Arc;

use rayon::prelude::*;

use crate::args::{BuildSystem, Platform, TargetLanguage};
use crate::package::management::DependencyManager;
use crate::package::target_properties::MergeTargetProperties;
use crate::package::{App, Config};
use crate::package::{
management::DependencyManager, target_properties::MergeTargetProperties, App, Config,
OUTPUT_DIRECTORY,
};
use crate::util::errors::{AnyError, BuildResult, LingoError};

pub mod cmake_c;
Expand Down
24 changes: 15 additions & 9 deletions src/package/lock.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
use crate::package::management::copy_dir_all;
use crate::package::target_properties::{LibraryTargetProperties, MergeTargetProperties};
use crate::package::tree::{DependencyTreeNode, PackageDetails, ProjectSource};
use crate::package::ConfigFile;
use crate::package::{deserialize_version, serialize_version};
use crate::util::errors::LingoError;
use colored::Colorize;
use serde::de::{Error, StdError};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde::{
de::{Error, StdError},
Deserialize, Deserializer, Serialize, Serializer,
};
use versions::Versioning;

use std::cmp::PartialEq;
use std::collections::HashMap;
use std::fmt::{Debug, Display, Formatter};
use std::fs;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use versions::Versioning;

use crate::package::management::copy_dir_all;
use crate::package::{
deserialize_version, serialize_version,
target_properties::{LibraryTargetProperties, MergeTargetProperties},
tree::{DependencyTreeNode, PackageDetails, ProjectSource},
ConfigFile,
};
use crate::util::errors::LingoError;

struct ParseLockSourceError {}

Expand Down
20 changes: 11 additions & 9 deletions src/package/management.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
use crate::package::lock::DependencyLock;
use crate::package::target_properties::LibraryTargetProperties;
use crate::package::tree::{DependencyTreeNode, GitLock, PackageDetails, ProjectSource};
use crate::package::ConfigFile;
use crate::package::LIBRARY_DIRECTORY;
use crate::util::errors::LingoError;
use colored::Colorize;
use log::error;
use versions::{Requirement, Versioning};

use std::collections::HashMap;
use std::fs;
use std::fs::File;
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use versions::{Requirement, Versioning};
use std::path::{Path, PathBuf};

use crate::package::{
lock::DependencyLock,
target_properties::LibraryTargetProperties,
tree::{DependencyTreeNode, GitLock, PackageDetails, ProjectSource},
ConfigFile, LIBRARY_DIRECTORY,
};
use crate::util::errors::LingoError;

#[derive(Default)]
pub struct DependencyManager {
Expand Down
17 changes: 12 additions & 5 deletions src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,24 @@ use which::which;
use std::fs::{read_to_string, remove_dir_all, remove_file, write};
use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use std::{env, fmt, io};
use std::str::FromStr;
use std::{env, fmt, io};

use crate::util::{analyzer, copy_recursively, errors::{BuildResult, LingoError}};
use crate::args::{BuildSystem, InitArgs, Platform, TargetLanguage, BuildSystem::{CMake, LFC}};
use crate::args::{
BuildSystem,
BuildSystem::{CMake, LFC},
InitArgs, Platform, TargetLanguage,
};
use crate::package::{
tree::PackageDetails,
target_properties::{
AppTargetProperties, AppTargetPropertiesFile, LibraryTargetProperties,
LibraryTargetPropertiesFile,
}
},
tree::PackageDetails,
};
use crate::util::{
analyzer, copy_recursively,
errors::{BuildResult, LingoError},
};

/// place where are the build artifacts will be dropped
Expand Down
7 changes: 5 additions & 2 deletions src/package/tree.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
use crate::package::target_properties::LibraryTargetProperties;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use url::Url;
use versions::{Requirement, Versioning};

use std::path::PathBuf;

use crate::package::target_properties::LibraryTargetProperties;

#[derive(Clone, Deserialize, Serialize, Debug)]
pub enum ProjectSource {
#[serde(rename = "git")]
Expand Down
4 changes: 2 additions & 2 deletions src/util/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use which::which;

use std::path::{Path, PathBuf};
use std::{fs, io};

use which::which;

pub mod analyzer;
mod command_line;
pub mod errors;
Expand Down

0 comments on commit 36509d6

Please sign in to comment.