Skip to content

Commit 7b66f2e

Browse files
committed
Merge branch 'wip6' into component_model_1
2 parents 01621ef + d387f9c commit 7b66f2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+201
-1471
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,17 @@ path = "module/core/former_types"
243243
default-features = false
244244

245245
[workspace.dependencies.component_model]
246-
version = "~0.1.0"
246+
version = "~0.2.0"
247247
path = "module/core/component_model"
248248
default-features = false
249249

250250
[workspace.dependencies.component_model_meta]
251-
version = "~0.1.0"
251+
version = "~0.2.0"
252252
path = "module/core/component_model_meta"
253253
default-features = false
254254

255255
[workspace.dependencies.component_model_types]
256-
version = "~0.1.0"
256+
version = "~0.2.0"
257257
path = "module/core/component_model_types"
258258
default-features = false
259259

@@ -298,7 +298,7 @@ default-features = false
298298
## macro tools
299299

300300
[workspace.dependencies.macro_tools]
301-
version = "~0.53.0"
301+
version = "~0.54.0"
302302
path = "module/core/macro_tools"
303303
default-features = false
304304

module/core/clone_dyn_meta/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ proc-macro = true
3131
[features]
3232
default = [ "enabled" ]
3333
full = [ "enabled" ]
34-
enabled = [ "macro_tools/enabled", "former_types/enabled" ]
34+
enabled = [ "macro_tools/enabled", "component_model_types/enabled" ]
3535

3636
[dependencies]
3737
macro_tools = { workspace = true, features = [ "attr", "attr_prop", "ct", "diag", "generic_params", "punctuated", "phantom", "item_struct", "quantifier" ] } # qqq : optimize set of features
38-
former_types = { workspace = true, features = [ "types_component_assign" ] }
38+
component_model_types = { workspace = true, features = [ "types_component_assign" ] }
3939

4040
[dev-dependencies]
4141
test_tools = { workspace = true }

module/core/clone_dyn_meta/src/derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use macro_tools::
99
generic_params,
1010
ct,
1111
};
12-
use former_types::{ Assign };
12+
use component_model_types::{ Assign };
1313

1414
//
1515

module/core/component_model/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "component_model"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
authors = [
66
"Kostiantyn Wandalen <[email protected]>",
@@ -33,28 +33,23 @@ use_alloc = [ "no_std", "component_model_types/use_alloc", "collection_tools/use
3333

3434
default = [
3535
"enabled",
36-
"derive_component_model",
3736
"derive_components",
3837
"derive_component_from",
3938
"derive_component_assign",
4039
"derive_components_assign",
4140
"derive_from_components",
42-
"types_component_model",
4341
"types_component_assign",
4442
]
4543
full = [
4644
"default",
4745
]
4846
enabled = [ "component_model_meta/enabled", "component_model_types/enabled" ]
4947

50-
derive_component_model = [ "component_model_meta/derive_component_model", "types_component_model" ]
5148
derive_components = [ "component_model_meta/derive_components", "derive_component_assign", "derive_components_assign", "derive_component_from", "derive_from_components" ]
5249
derive_component_assign = [ "component_model_meta/derive_component_assign", "types_component_assign" ]
5350
derive_components_assign = [ "derive_component_assign", "component_model_meta/derive_components_assign" ]
5451
derive_component_from = [ "component_model_meta/derive_component_from" ]
5552
derive_from_components = [ "component_model_meta/derive_from_components" ]
56-
57-
types_component_model = [ "component_model_types/types_component_model" ]
5853
types_component_assign = [ "component_model_types/types_component_assign" ]
5954

6055
[dependencies]
Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,3 @@
1-
// //! ## Example : Trivial
2-
// //!
3-
// //! The provided code snippet illustrates a basic use-case of the Former, which is used to apply the builder pattern for to construct complex objects step-by-step, ensuring they are always in a valid state and hiding internal structures.
4-
// //!
5-
//
6-
// #[ cfg( any( not( feature = "derive_component_model" ), not( feature = "enabled" ) ) ) ]
7-
// fn main() {}
8-
//
9-
// #[ cfg( all( feature = "derive_component_model", feature = "enabled" ) ) ]
10-
// fn main()
11-
// {
12-
// use component_model::Former;
13-
//
14-
// // Use attribute debug to print expanded code.
15-
// #[ derive( Debug, PartialEq, Former ) ]
16-
// // Uncomment to see what derive expand into
17-
// // #[ debug ]
18-
// pub struct UserProfile
19-
// {
20-
// age : i32,
21-
// username : String,
22-
// bio_optional : Option< String >, // Fields could be optional
23-
// }
24-
//
25-
// let profile = UserProfile::component_model()
26-
// .age( 30 )
27-
// .username( "JohnDoe".to_string() )
28-
// .bio_optional( "Software Developer".to_string() ) // Optionally provide a bio
29-
// .form();
30-
//
31-
// dbg!( &profile );
32-
// // Expected output:
33-
// // &profile = UserProfile {
34-
// // age: 30,
35-
// // username: "JohnDoe",
36-
// // bio_optional: Some("Software Developer"),
37-
// // }
38-
//
39-
// }
401

412
fn main() {}
423
// qqq : xxx : write it

module/core/component_model_meta/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "component_model_meta"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
authors = [
66
"Kostiantyn Wandalen <[email protected]>",

module/core/component_model_types/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "component_model_types"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
authors = [
66
"Kostiantyn Wandalen <[email protected]>",
@@ -30,17 +30,14 @@ use_alloc = [ "no_std", "collection_tools/use_alloc" ]
3030

3131
default = [
3232
"enabled",
33-
"types_component_model",
3433
"types_component_assign",
3534
]
3635
full = [
3736
"enabled",
38-
"types_component_model",
3937
"types_component_assign",
4038
]
4139
enabled = [ "collection_tools/enabled" ]
4240

43-
types_component_model = []
4441
types_component_assign = []
4542

4643

module/core/component_model_types/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ and implements the `Assign` trait for its fields. It shows how to use these impl
1717
instance using different types that can be converted into the required types.
1818

1919
```rust
20-
#[ cfg( any( not( feature = "types_component_model" ), not( feature = "enabled" ) ) ) ]
20+
#[ cfg( any( not( feature = "types_component_assign" ), not( feature = "enabled" ) ) ) ]
2121
fn main() {}
2222

23-
#[ cfg( all( feature = "types_component_model", feature = "enabled" ) ) ]
23+
#[ cfg( all( feature = "types_component_assign", feature = "enabled" ) ) ]
2424
fn main()
2525
{
2626
use component_model_types::Assign;

module/core/component_model_types/examples/component_model_types_trivial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
//! - `got.assign( "John" )`: Assigns the string `"John"` to the `name` field.
2121
//!
2222
23-
#[ cfg( any( not( feature = "types_component_model" ), not( feature = "enabled" ) ) ) ]
23+
#[ cfg( any( not( feature = "types_component_assign" ), not( feature = "enabled" ) ) ) ]
2424
fn main() {}
2525

26-
#[ cfg( all( feature = "types_component_model", feature = "enabled" ) ) ]
26+
#[ cfg( all( feature = "types_component_assign", feature = "enabled" ) ) ]
2727
fn main()
2828
{
2929
use component_model_types::Assign;

module/core/component_model_types/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ pub mod dependency
1616
pub use ::collection_tools;
1717
}
1818

19-
// #[ doc( inline ) ] // Removed this block
20-
// #[ cfg( feature = "enabled" ) ]
21-
// pub use own::*;
19+
#[ doc( inline ) ]
20+
#[ cfg( feature = "enabled" ) ]
21+
pub use own::*;
2222

2323
/// Own namespace of the module.
2424
#[ cfg( feature = "enabled" ) ]

0 commit comments

Comments
 (0)