|
| 1 | +# Task Plan: Comment out `#[derive(Debug)]` attributes |
| 2 | + |
| 3 | +### Goal |
| 4 | +* To identify and comment out all instances of `#[derive(Debug)]` attributes in the `former_meta` and `macro_tools` crates, ensuring they are not present in production builds, and verify this by performing a clean rebuild. |
| 5 | + |
| 6 | +### Ubiquitous Language (Vocabulary) |
| 7 | +* **`former_meta`**: The procedural macro implementation crate. |
| 8 | +* **`macro_tools`**: The utility crate that might be involved in code generation. |
| 9 | +* **`#[derive(Debug)]`**: The attribute to be commented out. |
| 10 | +* **Clean Rebuild**: Compiling the project after removing all previously compiled artifacts (`cargo clean`). |
| 11 | +* **Crate Conformance Check**: The standard validation procedure for a crate (`test` and `clippy`). |
| 12 | + |
| 13 | +### Progress |
| 14 | +* **Roadmap Milestone:** N/A |
| 15 | +* **Primary Editable Crate:** `module/core/former_meta` |
| 16 | +* **Overall Progress:** 1/2 increments complete |
| 17 | +* **Increment Status:** |
| 18 | + * ✅ Increment 1: Identify and comment out `#[derive(Debug)]` attributes |
| 19 | + * ⚫ Increment 2: Finalization |
| 20 | + |
| 21 | +### Permissions & Boundaries |
| 22 | +* **Mode:** code |
| 23 | +* **Run workspace-wise commands:** false |
| 24 | +* **Add transient comments:** false |
| 25 | +* **Additional Editable Crates:** |
| 26 | + * `module/core/macro_tools` |
| 27 | + |
| 28 | +### Relevant Context |
| 29 | +* Control Files to Reference (if they exist): |
| 30 | + * N/A |
| 31 | +* Files to Include (for AI's reference, if `read_file` is planned): |
| 32 | + * `module/core/former_meta/src/**/*.rs` (to be searched) |
| 33 | + * `module/core/macro_tools/src/**/*.rs` (to be searched) |
| 34 | +* Crates for Documentation (for AI's reference, if `read_file` on docs is planned): |
| 35 | + * `former_meta` |
| 36 | + * `macro_tools` |
| 37 | + |
| 38 | +### Expected Behavior Rules / Specifications |
| 39 | +* All instances of `#[derive(Debug)]` in the specified crates must be commented out. |
| 40 | +* The project must compile successfully after the changes. |
| 41 | +* A clean rebuild must not show any `#[derive(Debug)]` attributes in the generated code (if applicable). |
| 42 | +* The entire workspace must pass tests and clippy checks. |
| 43 | + |
| 44 | +### Crate Conformance Check Procedure |
| 45 | +* **Step 1: Run Build.** Execute `timeout 300 cargo build -p {crate_name}`. If this fails, fix all compilation errors before proceeding. |
| 46 | +* **Step 2: Run Tests (Conditional).** Only if Step 1 passes, execute `timeout 90 cargo test -p {crate_name} --all-targets`. |
| 47 | +* **Step 3: Run Linter (Conditional).** Only if Step 2 passes, execute `timeout 90 cargo clippy -p {crate_name} -- -D warnings`. |
| 48 | + |
| 49 | +### Increments |
| 50 | +##### Increment 1: Identify and comment out `#[derive(Debug)]` attributes |
| 51 | +* **Goal:** Locate all instances of `#[derive(Debug)]` in `former_meta` and `macro_tools` and comment them out. |
| 52 | +* **Specification Reference:** User request to comment out `#[derive(Debug)]`. |
| 53 | +* **Steps:** |
| 54 | + 1. Use `search_files` to find all occurrences of `#[derive(Debug)]` in `module/core/former_meta/src/` with file pattern `*.rs`. (Result: 0 matches) |
| 55 | + 2. For each found file, use `search_and_replace` to replace `#[derive(Debug)]` with `// #[derive(Debug)]`. (Skipped due to no matches) |
| 56 | + 3. Use `search_files` to find all occurrences of `#[derive(Debug)]` in `module/core/macro_tools/src/` with file pattern `*.rs`. (Result: 0 matches) |
| 57 | + 4. For each found file, use `search_and_replace` to replace `#[derive(Debug)]` with `// #[derive(Debug)]`. (Skipped due to no matches) |
| 58 | + 5. Perform Increment Verification by running `timeout 300 cargo build -p former_meta` and `timeout 300 cargo build -p macro_tools` to confirm compilation after changes. |
| 59 | + 6. Perform Crate Conformance Check on `former_meta`. |
| 60 | + 7. Perform Crate Conformance Check on `macro_tools`. |
| 61 | +* **Increment Verification:** |
| 62 | + * Step 1: Execute `timeout 300 cargo build -p former_meta` via `execute_command`. |
| 63 | + * Step 2: Execute `timeout 300 cargo build -p macro_tools` via `execute_command`. |
| 64 | + * Step 3: Analyze the output to confirm successful compilation. |
| 65 | +* **Commit Message:** "feat(debug): Comment out #[derive(Debug)] attributes" |
| 66 | + |
| 67 | +##### Increment 2: Finalization |
| 68 | +* **Goal:** Perform a final, holistic review and verification of the workspace to ensure all issues are resolved and no regressions were introduced, respecting the project constraints. |
| 69 | +* **Specification Reference:** The initial user request. |
| 70 | +* **Steps:** |
| 71 | + 1. Perform Crate Conformance Check on `former`. |
| 72 | + 2. Perform Crate Conformance Check on `former_meta`. |
| 73 | + 3. Perform Crate Conformance Check on `former_types`. |
| 74 | + 4. Perform Crate Conformance Check on `macro_tools`. |
| 75 | + 5. Self-critique against all requirements and rules. |
| 76 | +* **Increment Verification:** |
| 77 | + * The successful execution of the per-crate conformance checks serves as verification. |
| 78 | +* **Commit Message:** "chore(workspace): Final verification after debug attribute removal" |
| 79 | + |
| 80 | +### Task Requirements |
| 81 | +* The `#[derive(Debug)]` attributes must be commented out. |
| 82 | +* The project must compile successfully after the changes. |
| 83 | +* The final solution must not introduce any new warnings. |
| 84 | +* The functionality of the `Former` macro should remain unchanged. |
| 85 | + |
| 86 | +### Project Requirements |
| 87 | +* Must use Rust 2021 edition. |
| 88 | + |
| 89 | +### Assumptions |
| 90 | +* `#[derive(Debug)]` attributes are explicitly present in source files and not solely generated by other macros without direct source representation. |
| 91 | +* Commenting out the `#[derive(Debug)]` attribute will not cause compilation errors or break functionality. |
| 92 | + |
| 93 | +### Out of Scope |
| 94 | +* Refactoring any logic beyond what is necessary to comment out the debug attributes. |
| 95 | +* Adding new features. |
| 96 | + |
| 97 | +### External System Dependencies (Optional) |
| 98 | +* N/A |
| 99 | + |
| 100 | +### Notes & Insights |
| 101 | +* The task requires a clean rebuild to ensure that no debug attributes are implicitly generated or left over from previous builds. |
| 102 | + |
| 103 | +### Changelog |
| 104 | +* [Initial Plan | 2025-07-05 18:40 UTC] Plan created to address commenting out `#[derive(Debug)]` attributes. |
| 105 | +* [Plan Elaboration | 2025-07-05 18:41 UTC] Elaborated the detailed steps for Increment 1 and updated its status to ⏳. |
| 106 | +* [Increment 1 | 2025-07-05 18:41 UTC] No direct `#[derive(Debug)]` attributes found in source files of `former_meta` or `macro_tools`. Proceeding to verification. |
| 107 | +* [Plan Adjustment | 2025-07-05 18:43 UTC] Increased timeout for `cargo build --workspace` to 300 seconds due to previous timeout. |
| 108 | +* [Plan Adjustment | 2025-07-05 18:45 UTC] Added Increment 2 to fix widespread compilation errors before proceeding with debug attribute verification. Updated `Primary Editable Crate` and `Additional Editable Crates` to include `wplot`, `optimization_tools`, and `unitore`. |
| 109 | +* [Plan Adjustment | 2025-07-05 19:04 UTC] Reverted changes to the plan to focus only on `former_meta` and `macro_tools` as per new user instructions. Removed Increment 2 (Fix workspace compilation errors) and updated `Permissions & Boundaries` and `Increment 1` verification steps. |
| 110 | +* [Increment 1 | 2025-07-05 19:05 UTC] `former_meta` and `macro_tools` compiled successfully. |
0 commit comments