Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

READY: (willbe): Add duplicate flag and restructure dependency reporting #1301

Merged
merged 3 commits into from
May 1, 2024

Conversation

Barsik-sus
Copy link
Contributor

A 'duplicate' flag was added to the 'ListNodeReport' struct to indicate a node is a duplicate. The process of dependency reporting was restructured with a focus to handle such duplicates more effectively. Also added new functions that merge development dependencies and rearrange duplicates to ensure correct dependency relationships are visualized in reports.

Before:

wca
├─ error_tools
│  [dev-dependencies]
│  └─ test_tools
│     ├─ data_type
│     │  └─ interval_adapter
│     │     [dev-dependencies]
│     │     └─ test_tools(*)
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     ├─ diagnostics_tools
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     ├─ error_tools(*)
│     ├─ former
│     │  ├─ collection_tools
│     │  │  [dev-dependencies]
│     │  │  └─ test_tools(*)
│     │  └─ former_meta
│     │     ├─ iter_tools
│     │     │  [dev-dependencies]
│     │     │  └─ test_tools(*)
│     │     └─ macro_tools
│     │        └─ interval_adapter(*)
│     │        [dev-dependencies]
│     │        └─ test_tools(*)
│     │     [dev-dependencies]
│     │     ├─ former(*)
│     │     └─ test_tools(*)
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     ├─ mem_tools
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     ├─ meta_tools
│     │  ├─ for_each
│     │  │  [dev-dependencies]
│     │  │  └─ test_tools(*)
│     │  ├─ impls_index
│     │  │  └─ impls_index_meta
│     │  │     └─ macro_tools(*)
│     │  │  [dev-dependencies]
│     │  │  └─ test_tools(*)
│     │  └─ mod_interface
│     │     └─ mod_interface_meta
│     │        ├─ derive_tools
│     │        │  ├─ clone_dyn
│     │        │  │  └─ clone_dyn_meta
│     │        │  │     └─ macro_tools(*)
│     │        │  │     [dev-dependencies]
│     │        │  │     └─ test_tools(*)
│     │        │  │  [dev-dependencies]
│     │        │  │  └─ test_tools(*)
│     │        │  ├─ derive_tools_meta
│     │        │  │  ├─ iter_tools(*)
│     │        │  │  └─ macro_tools(*)
│     │        │  │  [dev-dependencies]
│     │        │  │  └─ test_tools(*)
│     │        │  └─ variadic_from
│     │        │     └─ derive_tools_meta(*)
│     │        │     [dev-dependencies]
│     │        │     └─ test_tools(*)
│     │        │  [dev-dependencies]
│     │        │  └─ test_tools(*)
│     │        └─ macro_tools(*)
│     │        [dev-dependencies]
│     │        └─ test_tools(*)
│     │     [dev-dependencies]
│     │     └─ test_tools(*)
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     ├─ process_tools
│     │  ├─ error_tools(*)
│     │  ├─ former(*)
│     │  ├─ iter_tools(*)
│     │  ├─ mod_interface(*)
│     │  └─ proper_path_tools
│     │     └─ mod_interface(*)
│     │     [dev-dependencies]
│     │     └─ test_tools(*)
│     │  [dev-dependencies]
│     │  └─ test_tools(*)
│     └─ typing_tools
│        ├─ implements
│        │  [dev-dependencies]
│        │  └─ test_tools(*)
│        ├─ inspect_type
│        │  [dev-dependencies]
│        │  └─ test_tools(*)
│        └─ is_slice
│           [dev-dependencies]
│           └─ test_tools(*)
│        [dev-dependencies]
│        └─ test_tools(*)
├─ former(*)
├─ iter_tools(*)
├─ mod_interface(*)
└─ strs_tools
   └─ former(*)
   [dev-dependencies]
   └─ test_tools(*)
[dev-dependencies]
└─ test_tools(*)

After

wca
├─ error_tools
├─ strs_tools
│  └─ former(*)
├─ former
│  ├─ collection_tools
│  └─ former_meta
│     ├─ iter_tools(*)
│     └─ macro_tools
│        └─ interval_adapter(*)
├─ iter_tools
└─ mod_interface
   └─ mod_interface_meta
      ├─ derive_tools
      │  ├─ clone_dyn
      │  │  └─ clone_dyn_meta
      │  │     └─ macro_tools(*)
      │  ├─ derive_tools_meta
      │  │  ├─ iter_tools(*)
      │  │  └─ macro_tools(*)
      │  └─ variadic_from
      │     └─ derive_tools_meta(*)
      └─ macro_tools(*)
[dev-dependencies]
├─ test_tools(*)
├─ former(*)
└─ test_tools
   ├─ data_type
   │  └─ interval_adapter
   ├─ diagnostics_tools
   ├─ error_tools(*)
   ├─ former(*)
   ├─ mem_tools
   ├─ meta_tools
   │  ├─ for_each
   │  ├─ impls_index
   │  │  └─ impls_index_meta
   │  │     └─ macro_tools(*)
   │  └─ mod_interface(*)
   ├─ process_tools
   │  ├─ error_tools(*)
   │  ├─ former(*)
   │  ├─ iter_tools(*)
   │  ├─ mod_interface(*)
   │  └─ proper_path_tools
   │     └─ mod_interface(*)
   └─ typing_tools
      ├─ implements
      ├─ inspect_type
      └─ is_slice

A 'duplicate' flag was added to the 'ListNodeReport' struct to indicate a node is a duplicate. The process of dependency reporting was restructured with a focus to handle such duplicates more effectively. Also added new functions that merge development dependencies and rearrange duplicates to ensure correct dependency relationships are visualized in reports.
The rearrangement of duplicates function on file `list.rs` has been removed to simplify the dependency reporting method. Development dependencies will now directly merged without handling duplicates, this allows for cleaner, more straightforward code and potentially better performance. The whitespace inconsistencies across the file have also been fixed.
@Barsik-sus Barsik-sus changed the title NOT READY: (willbe): Add duplicate flag and restructure dependency reporting READY: (willbe): Add duplicate flag and restructure dependency reporting Apr 23, 2024
The merge_build_dependencies function has been integrated into the overall dependency reporting method in `list.rs`. This change aims to provide a more comprehensive overview of all dependencies – normal, dev, and build – in a single report. The function merge_build_dependencies_impl has also been added to support recursive merging for complex project structures.
@Wandalen Wandalen merged commit 3014c10 into Wandalen:alpha May 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants