Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions module/move/willbe/src/action/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,32 @@ mod private
.package_find_by_manifest( manifest_file )
.ok_or_else( || format_err!( "Package not found in the workspace" ) )
.err_with_report( report )?;
let version = if args.info.contains( &PackageAdditionalInfo::Version )
{
Some( package.version().to_string() )
}
else
{
None
};
let crate_dir = if args.info.contains( &PackageAdditionalInfo::Path )
{
Some( package.crate_dir() ).transpose()
}
else
{
Ok( None )
}
.err_with_report( report )?;
let mut package_report = tool::ListNodeReport
{
name : package.name().to_string(),
// qqq : for Bohdan : too long lines
version : if args.info.contains( &PackageAdditionalInfo::Version ) { Some( package.version().to_string() ) } else { None },
// qqq : for Bohdan : don't put multiline if into struct constructor
crate_dir : if args.info.contains( &PackageAdditionalInfo::Path )
{ Some( package.crate_dir() ).transpose() }
else
{ Ok( None ) }
.err_with_report( report )?,
// aaa : for Bohdan : too long lines
// aaa : moved out
version,
// aaa : for Bohdan : don't put multiline if into struct constructor
// aaa : moved out
crate_dir,
duplicate : false,
normal_dependencies : vec![],
dev_dependencies : vec![],
Expand Down
4 changes: 2 additions & 2 deletions module/move/willbe/src/action/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod private
// -> Result< TestsReport, ( TestsReport, Error ) >
{

// qqq : incapsulate progress bar logic into some function of struct. don't keep it here
// aaa : incapsulate progress bar logic into some function of struct. don't keep it here
// aaa : done

let mut report = TestsReport::default();
Expand Down Expand Up @@ -164,7 +164,7 @@ Try to install it with `rustup install {}` command(-s)",
).err_with_report( &report )?;

println!( "{plan}" );
// aaa : split on two functions for create plan and for execute
// aaa : split on two functions for create plan and for execute
// aaa : it's already separated, look line: 203 : let result = tests_run( &options );

let temp_path = if temp
Expand Down
4 changes: 2 additions & 2 deletions module/move/willbe/src/command/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ mod private
Ok( () )
}

impl TryFrom< wca::Props > for ListProperties
impl TryFrom< wca::executor::Props > for ListProperties
{
type Error = error::untyped::Error;
fn try_from( value : wca::Props ) -> Result< Self, Self::Error >
fn try_from( value : wca::executor::Props ) -> Result< Self, Self::Error >
{
let mut this = Self::former();

Expand Down
4 changes: 2 additions & 2 deletions module/move/willbe/src/command/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ mod private
}
}

impl TryFrom< wca::Props > for PublishProperties
impl TryFrom< wca::executor::Props > for PublishProperties
{
type Error = error::untyped::Error;
fn try_from( value : wca::Props ) -> Result< Self, Self::Error >
fn try_from( value : wca::executor::Props ) -> Result< Self, Self::Error >
{
let mut this = Self::former();

Expand Down
4 changes: 2 additions & 2 deletions module/move/willbe/src/command/publish_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ mod private
Ok( () )
}

impl TryFrom< wca::Props > for PublishDiffProperties
impl TryFrom< wca::executor::Props > for PublishDiffProperties
{
type Error = error::untyped::Error;
fn try_from( value : wca::Props ) -> Result< Self, Self::Error >
fn try_from( value : wca::executor::Props ) -> Result< Self, Self::Error >
{
let mut this = Self::former();

Expand Down
6 changes: 3 additions & 3 deletions module/move/willbe/src/command/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ Set at least one of them to true." );
}
}

impl TryFrom< wca::Props > for TestsProperties
impl TryFrom< wca::executor::Props > for TestsProperties
{
type Error = error::untyped::Error;
fn try_from( value : wca::Props ) -> Result< Self, Self::Error >
fn try_from( value : wca::executor::Props ) -> Result< Self, Self::Error >
{
let mut this = Self::former();

Expand Down Expand Up @@ -192,4 +192,4 @@ crate::mod_interface!
{
/// run tests in specified crate
exposed use test;
}
}
4 changes: 2 additions & 2 deletions module/move/willbe/src/command/workspace_renew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ mod private
.context( "Fail to create workspace" )
}

impl TryFrom< wca::Props > for WorkspaceNewProperties
impl TryFrom< wca::executor::Props > for WorkspaceNewProperties
{
type Error = error::untyped::Error;

fn try_from( value : wca::Props ) -> std::result::Result< Self, Self::Error >
fn try_from( value : wca::executor::Props ) -> std::result::Result< Self, Self::Error >
{
let mut this = Self::former();

Expand Down
9 changes: 7 additions & 2 deletions module/move/willbe/src/entity/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,13 @@ mod private
}
DependenciesSort::Topological =>
{
// qqq : too long line
graph::toposort( graph::construct( &graph ) ).map_err( | err | format_err!( "{}", err ) )?.into_iter().filter( | x | x != &root ).collect()
// aaa : too long line
// aaa : splited
graph::toposort( graph::construct( &graph ) )
.map_err( | err | format_err!( "{}", err ) )?
.into_iter()
.filter( | x | x != &root )
.collect()
},
};

Expand Down
6 changes: 3 additions & 3 deletions module/move/willbe/src/entity/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ mod private
/// Represents the optimization setting for the test variant.
optimization : optimization::Optimization,
/// Contains additional features or characteristics of the test variant.
features : collection::BTreeSet<String>,
features : collection::BTreeSet< String >,
}

impl fmt::Display for TestVariant
{
fn fmt( &self, f : &mut fmt::Formatter< '_ >) -> fmt::Result
fn fmt( &self, f : &mut fmt::Formatter< '_ > ) -> fmt::Result
{
let features = if self.features.is_empty() { " ".to_string() } else { self.features.iter().join( " " ) };
writeln!( f, "{} {} {}", self.optimization, self.channel, features )?;
Expand All @@ -58,7 +58,7 @@ mod private

impl fmt::Display for TestPlan
{
fn fmt( &self, f : &mut fmt::Formatter< '_ >) -> std::fmt::Result
fn fmt( &self, f : &mut fmt::Formatter< '_ > ) -> std::fmt::Result
{
writeln!( f, "Plan: " )?;
for plan in &self.packages_plan
Expand Down
2 changes: 1 addition & 1 deletion module/move/willbe/src/tool/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ mod private
impl TemplateParameters
{
/// Extracts template values from props for parameters required for this template.
pub fn values_from_props( &self, props : &wca::Props ) -> TemplateValues
pub fn values_from_props( &self, props : &wca::executor::Props ) -> TemplateValues
{
let values = self.descriptors
.iter()
Expand Down
8 changes: 0 additions & 8 deletions module/move/willbe/tests/inc/action_tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
use super::*;
// use the_module::*;

// qqq : for Bohdan : bad. don't import the_module::*
use inc::helper::
{
ProjectBuilder,
WorkspaceBuilder,
// BINARY_NAME,
};

use collection::BTreeSet;
// use std::
// {
// fs::{ self, File },
// io::Write,
// };
// use path::{ Path, PathBuf };
use assert_fs::TempDir;

use the_module::action::test::{ test, TestsCommandOptions };
Expand Down
Loading