Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d53048f
feat(derive_tools_meta): Remove automatically_derived from debug output
wanguardd Jul 5, 2025
805c655
tasks
wanguardd Jul 5, 2025
6b8d5b5
fix(derive_tools_meta): Remove inline attribute from generated Deref …
wanguardd Jul 5, 2025
1457e26
wip
wanguardd Jul 5, 2025
c91e6df
spec
Wandalen Jul 5, 2025
2bdfca7
fix(derive_tools_meta): Resolve lifetime, unused assignment warning, …
Wandalen Jul 5, 2025
60f7de8
chore(finalization): Commit remaining task plan and changelog updates…
Wandalen Jul 5, 2025
0c01ece
feat(debug): Enable conditional debug output for derive macros
Wandalen Jul 5, 2025
a10f873
chore(final): Final verification and cleanup of derive_tools task
Wandalen Jul 5, 2025
f7854d5
fix
Wandalen Jul 5, 2025
e18fae1
unilang wip
wanguardd Jul 5, 2025
cae36b8
Merge branch 'cleaning_2' of github.com:Wandalen/wTools into cleaning_2
wanguardd Jul 5, 2025
6348bff
error_tools-v0.23.0
Wandalen Jul 5, 2025
f3d17ce
clone_dyn_types-v0.32.0
Wandalen Jul 5, 2025
c68d3a7
iter_tools-v0.30.0
Wandalen Jul 5, 2025
7bc824c
macro_tools-v0.56.0
Wandalen Jul 5, 2025
7291773
clone_dyn_meta-v0.32.0
Wandalen Jul 5, 2025
0701df5
former_types-v2.17.0
Wandalen Jul 5, 2025
f2e6f28
clone_dyn-v0.34.0
Wandalen Jul 5, 2025
274ff0e
derive_tools_meta-v0.36.0
Wandalen Jul 5, 2025
ae4fdb8
former_meta-v2.18.0
Wandalen Jul 5, 2025
16c73e7
test(parser): Add failing test for incorrect command path parsing
wanguardd Jul 5, 2025
8481f0a
fix(parser): Correctly parse command paths instead of treating them a…
wanguardd Jul 5, 2025
4d056a5
variadic_from : plan
Wandalen Jul 5, 2025
f12718b
docs(strs_tools): Investigate and document API for dynamic delimiters
wanguardd Jul 6, 2025
2ef415a
chore(unilang_instruction_parser): Finalize strs_tools API investigat…
wanguardd Jul 6, 2025
4187741
fix(variadic_from_meta): Align derive macro with spec v1.1
Wandalen Jul 6, 2025
6b2a9ed
chore(unilang_instruction_parser): Finalize strs_tools API investigat…
wanguardd Jul 6, 2025
4059858
feat(unilang_instruction_parser): Investigate strs_tools API blocking…
wanguardd Jul 6, 2025
f5bbfce
unilang_instruction_parser
wanguardd Jul 6, 2025
a7317b2
Merge branch 'cleaning_2' of github.com:Wandalen/wTools into cleaning_2
wanguardd Jul 6, 2025
f406a3e
variadic_from wip
Wandalen Jul 6, 2025
b49d633
Merge branch 'cleaning_2' of github.com:Wandalen/wTools into cleaning_2
Wandalen Jul 6, 2025
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
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ default-features = false
# features = [ "enabled" ]

[workspace.dependencies.derive_tools_meta]
version = "~0.35.0"
version = "~0.36.0"
path = "module/core/derive_tools_meta"
default-features = false
# features = [ "enabled" ]
Expand Down Expand Up @@ -175,18 +175,18 @@ default-features = false
# features = [ "enabled" ]

[workspace.dependencies.clone_dyn]
version = "~0.33.0"
version = "~0.34.0"
path = "module/core/clone_dyn"
default-features = false
# features = [ "enabled" ]

[workspace.dependencies.clone_dyn_meta]
version = "~0.31.0"
version = "~0.32.0"
path = "module/core/clone_dyn_meta"
# features = [ "enabled" ]

[workspace.dependencies.clone_dyn_types]
version = "~0.31.0"
version = "~0.32.0"
path = "module/core/clone_dyn_types"
default-features = false
# features = [ "enabled" ]
Expand All @@ -211,7 +211,7 @@ default-features = false
## iter

[workspace.dependencies.iter_tools]
version = "~0.29.0"
version = "~0.30.0"
path = "module/core/iter_tools"
default-features = false

Expand All @@ -234,12 +234,12 @@ path = "module/core/former"
default-features = false

[workspace.dependencies.former_meta]
version = "~2.17.0"
version = "~2.18.0"
path = "module/core/former_meta"
default-features = false

[workspace.dependencies.former_types]
version = "~2.16.0"
version = "~2.17.0"
path = "module/core/former_types"
default-features = false

Expand Down Expand Up @@ -299,7 +299,7 @@ default-features = false
## macro tools

[workspace.dependencies.macro_tools]
version = "~0.55.0"
version = "~0.56.0"
path = "module/core/macro_tools"
default-features = false

Expand Down Expand Up @@ -358,7 +358,7 @@ default-features = false
## error

[workspace.dependencies.error_tools]
version = "~0.22.0"
version = "~0.23.0"
path = "module/core/error_tools"
default-features = false

Expand Down
2 changes: 1 addition & 1 deletion module/core/clone_dyn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clone_dyn"
version = "0.33.0"
version = "0.34.0"
edition = "2021"
authors = [
"Kostiantyn Wandalen <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion module/core/clone_dyn_meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clone_dyn_meta"
version = "0.31.0"
version = "0.32.0"
edition = "2021"
authors = [
"Kostiantyn Wandalen <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion module/core/clone_dyn_types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clone_dyn_types"
version = "0.31.0"
version = "0.32.0"
edition = "2021"
authors = [
"Kostiantyn Wandalen <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions module/core/derive_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ parse_display = [ "parse-display" ]
[dependencies]

## external
derive_more = { version = "~1.0.0-beta.6", optional = true, default-features = false, features = [ "debug" ] }
derive_more = { version = "~1.0.0-beta.6", optional = true, default-features = false }
strum = { version = "~0.25", optional = true, default-features = false }
# strum_macros = { version = "~0.25.3", optional = true, default-features = false }
parse-display = { version = "~0.8.2", optional = true, default-features = false }
Expand All @@ -209,7 +209,7 @@ clone_dyn = { workspace = true, optional = true, features = [ "clone_dyn_types",
[dev-dependencies]

derive_tools_meta = { workspace = true, features = ["enabled"] }
macro_tools = { workspace = true, features = ["enabled", "diag"] }
macro_tools = { workspace = true, features = ["enabled", "diag", "attr"] }
test_tools = { workspace = true }

[build-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions module/core/derive_tools/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@
* Restored and validated the entire test suite for `derive_tools` crate.

* [2025-07-05] Finalized test suite restoration and validation, ensuring all tests pass and no linter warnings are present.

* [2025-07-06] Enabled conditional debug output for derive macros.
161 changes: 161 additions & 0 deletions module/core/derive_tools/task/task_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Task Plan: Fix errors in derive_tools and derive_tools_meta

### Goal
* To identify and resolve all compilation errors in the `derive_tools` and `derive_tools_meta` crates, ensuring they compile successfully and produce debug output only when the `#[debug]` attribute is present.

### Ubiquitous Language (Vocabulary)
* **derive_tools**: The primary crate providing derive macros.
* **derive_tools_meta**: The proc-macro crate implementing the logic for the derive macros in `derive_tools`.

### Progress
* **Roadmap Milestone:** N/A
* **Primary Editable Crate:** `module/core/derive_tools`
* **Overall Progress:** 3/4 increments complete
* **Increment Status:**
* ✅ Increment 1: Targeted Diagnostics - Identify compilation errors
* ✅ Increment 2: Fix E0597, unused_assignments warning, and typo in derive_tools_meta
* ✅ Increment 3: Enable Conditional Debug Output and Fix Related Errors/Lints
* ⏳ Increment 4: Finalization

### Permissions & Boundaries
* **Mode:** code
* **Run workspace-wise commands:** false
* **Add transient comments:** true
* **Additional Editable Crates:**
* `module/core/derive_tools_meta` (Reason: Proc-macro implementation for the primary crate)

### Relevant Context
* Control Files to Reference (if they exist):
* `./roadmap.md`
* `./spec.md`
* `./spec_addendum.md`
* Files to Include (for AI's reference, if `read_file` is planned):
* `module/core/derive_tools/Cargo.toml`
* `module/core/derive_tools_meta/Cargo.toml`
* `module/core/derive_tools_meta/src/derive/from.rs`
* `module/core/derive_tools/tests/inc/deref/basic_test.rs` (and other relevant test files)
* Crates for Documentation (for AI's reference, if `read_file` on docs is planned):
* `derive_tools`
* `derive_tools_meta`
* External Crates Requiring `task.md` Proposals (if any identified during planning):
* None identified yet.

### Expected Behavior Rules / Specifications
* The `derive_tools` and `derive_tools_meta` crates should compile without any errors or warnings.
* Debug output should be produced during compilation or testing *only* when the `#[debug]` attribute is explicitly present on the item.

### Crate Conformance Check Procedure
* Step 1: Run `cargo check -p derive_tools_meta` and `cargo check -p derive_tools` via `execute_command`. Analyze output for success.
* Step 2: If Step 1 passes, run `cargo test -p derive_tools_meta` and `cargo test -p derive_tools` via `execute_command`. Analyze output for success.
* Step 3: If Step 2 passes, run `cargo clippy -p derive_tools_meta -- -D warnings` and `cargo clippy -p derive_tools -- -D warnings` via `execute_command`. Analyze output for success.

### Increments
##### Increment 1: Targeted Diagnostics - Identify compilation errors
* **Goal:** To run targeted checks on `derive_tools_meta` and `derive_tools` to capture all compilation errors.
* **Specification Reference:** N/A
* **Steps:**
* Step 1: Execute `cargo check -p derive_tools_meta` to get errors from the meta crate.
* Step 2: Execute `cargo check -p derive_tools` to get errors from the main crate.
* Step 3: Analyze the output to identify all errors.
* Step 4: Update `Increment 2` with a detailed plan to fix the identified errors.
* **Increment Verification:**
* Step 1: The `execute_command` for both `cargo check` commands complete.
* Step 2: The output logs containing the errors are successfully analyzed.
* **Commit Message:** "chore(diagnostics): Capture initial compilation errors per-crate"

##### Increment 2: Fix E0597, unused_assignments warning, and typo in derive_tools_meta
* **Goal:** To fix the `E0597: `where_clause` does not live long enough` error, the `unused_assignments` warning, and the `predates` typo in `derive_tools_meta/src/derive/from.rs`.
* **Specification Reference:** N/A
* **Steps:**
* Step 1: Read the file `module/core/derive_tools_meta/src/derive/from.rs`.
* Step 2: Modify the code to directly assign the `Option<syn::WhereClause>` to `where_clause_owned` and then take a reference to it, resolving both the lifetime issue and the `unused_assignments` warning.
* Step 3: Correct the typo `predates` to `predicates` on line 515.
* Step 4: Perform Increment Verification.
* Step 5: Perform Crate Conformance Check.
* **Increment Verification:**
* Step 1: Execute `cargo clippy -p derive_tools_meta -- -D warnings` via `execute_command`.
* Step 2: Analyze the output to confirm that all errors and warnings are resolved.
* **Commit Message:** "fix(derive_tools_meta): Resolve lifetime, unused assignment warning, and typo in From derive"

##### Increment 3: Enable Conditional Debug Output and Fix Related Errors/Lints
* **Goal:** To ensure `diag::report_print` calls are present and conditionally executed based on the `#[debug]` attribute, and fix any related lints/errors.
* **Specification Reference:** User feedback.
* **Steps:**
* Step 1: Revert commenting of `diag::report_print` calls in `module/core/derive_tools_meta/src/derive/from.rs`.
* Step 2: Revert `_original_input` to `original_input` in `module/core/derive_tools_meta/src/derive/from.rs` (struct definitions and local variable assignments).
* Step 3: Ensure `diag` import is present in `module/core/derive_tools_meta/src/derive/from.rs`.
* Step 4: Add `#[debug]` attribute to `MyTuple` struct in `module/core/derive_tools/tests/inc/deref/basic_test.rs` to enable conditional debug output for testing.
* Step 5: Run `cargo clean` to ensure a fresh build.
* Step 6: Perform Crate Conformance Check.
* Step 7: Verify that debug output is produced only when `#[debug]` is present.
* **Increment Verification:**
* Step 1: `cargo check`, `cargo test`, and `cargo clippy` pass without errors or warnings.
* Step 2: Debug output is observed during `cargo test` for items with `#[debug]`, and absent for others.
* **Commit Message:** "feat(debug): Enable conditional debug output for derive macros"

##### Increment 4: Finalization
* **Goal:** To perform a final, holistic review and verification of the entire task's output, ensuring all errors are fixed and the crates are fully compliant.
* **Specification Reference:** N/A
* **Steps:**
* Step 1: Perform a final self-critique against all requirements.
* Step 2: Execute the full `Crate Conformance Check Procedure`.
* Step 3: Execute `git status` to ensure the working directory is clean.
* **Increment Verification:**
* Step 1: All checks in the `Crate Conformance Check Procedure` pass successfully based on `execute_command` output.
* Step 2: `git status` output shows a clean working tree.
* **Commit Message:** "chore(ci): Final verification of derive_tools fixes"

### Task Requirements
* All fixes must adhere to the project's existing code style.
* No new functionality should be introduced; the focus is solely on fixing existing errors.
* Do not run commands with the `--workspace` flag.

### Project Requirements
* All code must strictly adhere to the `codestyle` rulebook provided by the user at the start of the task.
* Must use Rust 2021 edition.

### Assumptions
* The errors are confined to the `derive_tools` and `derive_tools_meta` crates.
* The existing test suite is sufficient to catch regressions introduced by the fixes.

### Out of Scope
* Refactoring code that is not directly related to a compilation error.
* Updating dependencies unless required to fix an error.

### External System Dependencies
* None.

### Notes & Insights
* The errors in the meta crate will likely need to be fixed before the errors in the main crate can be fully resolved.

### Changelog
* [Initial] Plan created.
* [2025-07-05] Updated plan to avoid workspace commands per user instruction.
* [2025-07-05] Identified E0716 in `derive_tools_meta` and planned fix.
* [2025-07-05] Identified E0597 in `derive_tools_meta` and planned fix.
* [2025-07-05] Corrected `timeout` command syntax for Windows.
* [2025-07-05] Removed `timeout` wrapper from commands due to Windows compatibility issues.
* [2025-07-05] Planned fix for `unused_assignments` warning in `derive_tools_meta`.
* [2025-07-05] Planned fix for `predates` typo in `derive_tools_meta`.
* [2025-07-06] Commented out `diag::report_print` calls and related unused variables in `derive_tools_meta/src/derive/from.rs`.
* [2025-07-06] Rewrote `VariantGenerateContext` struct and constructor in `derive_tools_meta/src/derive/from.rs` to fix `E0560`/`E0609` errors.
* [2025-07-06] Reverted commenting of `diag::report_print` calls and `_original_input` to `original_input` in `derive_tools_meta/src/derive/from.rs`.
* [2025-07-06] Added `#[debug]` attribute to `MyTuple` in `derive_tools/tests/inc/deref/basic_test.rs`.
* [2025-07-06] Re-added `#[debug]` attribute to `MyTuple` in `derive_tools/tests/inc/deref/basic_test.rs` to explicitly enable debug output for testing.
* [2025-07-06] Corrected `#[attr::debug]` to `#[debug]` in `derive_tools/tests/inc/deref/basic_test.rs`.
* [2025-07-06] Enabled `attr` feature for `macro_tools` in `derive_tools/Cargo.toml` to resolve `unresolved import `macro_tools::attr`` error.
* [2025-07-06] Added dummy `debug` attribute macro in `derive_tools_meta/src/lib.rs` to resolve `cannot find attribute `debug` in this scope` error.
* [2025-07-06] Addressed `unused_variables` warning in `derive_tools_meta/src/lib.rs` by renaming `attr` to `_attr`.
* [2025-07-06] Corrected `#[debug]` to `#[debug]` in `derive_tools/tests/inc/deref/basic_test.rs`.
* [2025-07-06] Imported `derive_tools_meta::debug` in `derive_tools/tests/inc/deref/basic_test.rs` to resolve attribute error.
* [2025-07-06] Temporarily removed `#[debug]` from `MyTuple` in `derive_tools/tests/inc/deref/basic_test.rs` to isolate `Deref` issue.
* [2025-07-06] Removed `#[automatically_derived]` from generated code in `derive_tools_meta/src/derive/deref.rs` to fix `Deref` issue.
* [2025-07-06] Removed duplicated `#[inline(always)]` from generated code in `derive_tools_meta/src/derive/deref.rs`.
* [2025-07-06] Simplified generated `Deref` implementation in `derive_tools_meta/src/derive/deref.rs` to debug `E0614`.
* [2025-07-06] Passed `has_debug` to `generate` function and made `diag::report_print` conditional in `derive_tools_meta/src/derive/deref.rs`.
* [2025-07-06] Added `#[derive(Deref)]` to `MyTuple` in `derive_tools/tests/inc/deref/basic_test.rs`.
* [2025-07-06] Added `#[allow(clippy::too_many_arguments)]` to `generate` function in `derive_tools_meta/src/derive/deref.rs`.
* [2025-07-06] Updated `proc_macro_derive` for `Deref` to include `debug` attribute in `derive_tools_meta/src/lib.rs`.
* [2025-07-06] Removed dummy `debug` attribute macro from `derive_tools_meta/src/lib.rs`.
* [2025-07-06] Reordered `#[derive(Deref)]` and `#[debug]` attributes on `MyTuple` in `derive_tools/tests/inc/deref/basic_test.rs`.
* [2025-07-06] Verified conditional debug output for `Deref` derive macro.
Loading