aboutsummaryrefslogtreecommitdiff
path: root/mingling_core
Commit message (Collapse)AuthorAgeFilesLines
* feat(any): make `Grouped` trait unsafe and encapsulate `AnyOutput`魏曹先生33 hours4-15/+138
| | | | | | | | | | fields Declare `Grouped` as `unsafe trait` to make its soundness invariant visible. Make `AnyOutput.type_id` and `member_id` private; add public accessors and the `unsafe fn new_bare` constructor.
* feat(core): add generic parameter `C` to `StructuralData` trait魏曹先生46 hours5-12/+32
| | | | | | | Make `StructuralData` and `StructuralDataSealed` generic over a program collector type to bypass the orphan rule for `group_structural!`. This enables external types to implement `StructuralData<crate::ThisProgram>` without violating coherence.
* feat(core): add From impl for RenderResult with closure coercion魏曹先生48 hours1-1/+10
|
* feat(core, macros): add r_append! macro and RenderResult::append_other魏曹先生48 hours1-0/+44
| | | | | | | Implement `RenderResult::append_other()` to merge buffered content and immediate output behavior from one result into another. Add the `r_append!` macro with both explicit buffer (`dst, src`) and implicit buffer (`src`) usage forms, re-exported from `mingling::prelude`.
* feat(core): return `&mut Self` from builder methods魏曹先生2 days4-5/+13
| | | | | Enables method chaining for `with_resource`, `with_dispatcher`, `with_dispatchers`, `with_hook`, and `with_setup`
* fix(core): delegate stdout flushing to RenderResult::std_print魏曹先生2 days1-30/+8
|
* feat(core)!: replace RenderResult with buffered output model魏曹先生2 days6-77/+386
| | | | | | | | | | Remove `Deref<Target=str>` and `render_text:String` in favor of `render_buffer:Vec<(String, RenderResultMode)>` and an `immediate_output` flag. Add `RenderResultMode` enum, `r_eprint!`/`r_eprintln!` macros, and new buffer manipulation methods (`append_to_buffer`, `eprint`, etc.). Update `Display` to trim output and remove trailing newline. Migrate all callers and tests away from `Deref` usage.
* chore: add missing docs lint and document public API魏曹先生3 days6-0/+55
| | | | | | | Add `#![deny(missing_docs)]` across multiple crates and fill in documentation for all public items, including struct fields, enum variants, trait methods, and proc macros. Also mark two shell scripts as executable.
* feat(asset): deprecate with_dispatcher when dispatch_tree is enabled魏曹先生3 days1-5/+29
|
* feat(macros): add `#[buffer]` attribute and re-export `r_print!(ln)`魏曹先生3 days1-4/+4
| | | | | | | | | | | macros Reintroduce `r_print!` and `r_println!` macros as public exports, now supporting both explicit buffer argument and implicit `#[buffer]` attr. Add `#[buffer]` attribute macro that wraps unit-returning functions to produce a `RenderResult` with an automatically injected buffer variable. Relax `RenderResult::print()` and `println()` to accept `impl AsRef<str>`.
* feat(core)!: remove `to_chain` and `to_render` from `Grouped` trait魏曹先生3 days1-22/+2
| | | | | Move routing methods exclusively to the `Routable` trait and update all macro-generated code to reference `Routable` instead of `Grouped`
* feat(multishell): add `picker` feature gate and deprecate conflicting魏曹先生3 days3-0/+43
| | | | | | | | | | | | methods Deprecate `ShellContext` methods `filling_argument_first`, `filling_argument`, `typing_argument`, `strip_typed_argument`, and `get_typed_arguments` when the `picker` feature is active, as they do not work under all `ParserStyle` settings. Add `#![allow(deprecated)]` to the affected modules to suppress warnings from internal usage.
* feat(macros): add Routable trait and update route! macro魏曹先生4 days4-1/+41
| | | | | | Introduce a `Routable` trait with `to_chain` and `to_render` methods, replacing direct `Grouped` usage in the `route!` macro so error branches correctly route through the rendering pipeline
* fix!: rename `Groupped` to `Grouped` across the codebase魏曹先生4 days6-22/+22
|
* docs: add doc comments for Picker, AsPicker, and ProgramSetup traits魏曹先生4 days1-0/+17
|
* feat(program): add mutable access, take, and replace for program args魏曹先生5 days1-0/+27
|
* ix(macros)!: require explicit `.into()` on chain function return values魏曹先生5 days1-4/+3
|
* feat(core): add multiple From implementations for RenderResult魏曹先生5 days1-0/+50
| | | | | Implement `From<()>`, integer types, String, &String, and &str to allow renderers to return simple values directly
* feat(picker2): complete Picker2 prototype魏曹先生6 days6-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Picker2 replaces the original Picker1 with a two-phase (tag → pick) + mask-bitmap architecture, decoupling argument matching from type conversion via a composable matcher pipeline. Architecture - FlagMatcher — boolean flags (--verbose) - ArgMatcher — single flag+value pairs (--name Alice) - MultiArgMatcher — multi-value flag groups (--files a.txt b.txt) - PositionalMatcher — positional arguments, respects `--` - SingleMatcher — composite for Single-type Pickables Types - Flag (Active/Inactive) — semantic bool flag value - String + 14 numeric types via SinglePickable trait - Vec<T> — greedy multi-value (all SinglePickable types) - VecUntil<T> — bounded multi-value via BoundaryCheck trait - VecUntil<T>, pick_string, pick_numbers, pick_bool, pick_flag Style system - UNIX_STYLE (kebab), POWERSHELL_STYLE (Pascal), WINDOWS_STYLE (Pascal) - naming_case auto-conversion via just_fmt integration - Style-aware separator (= for Unix, : for PS/Windows) Infrastructure - internal_repeat! macro generates PickerPattern1..=32 - SinglePickable blanket impl → Pickable - MultiPickableWithBoundary trait with greedy/bounded variants - 151 integration tests - Docs updated for parser feature
* style: Reorder imports and reformat code with cargo fmt魏曹先生11 days3-8/+4
|
* feat(renderer): add new() constructor to RenderResult魏曹先生12 days1-0/+17
|
* feat: require renderers to return RenderResult instead of mutating one魏曹先生12 days6-22/+14
| | | | | | | BREAKING CHANGE: The `render` method on `Renderer`, `HelpRequest`, and `ProgramCollect` now returns `RenderResult` instead of taking `&mut RenderResult`. The `r_print!` and `r_println!` macros have been removed in favor of using `std::io::Write` directly on `RenderResult`.
* chore: bump workspace version to 0.3.0魏曹先生12 days6-42/+18
|
* chore: switch workspace dependencies from path to versioned 0.2.20.2.2魏曹先生13 days6-0/+24
|
* chore: bump mingling crates from 0.2.1 to 0.2.2魏曹先生13 days6-18/+18
|
* chore: remove published source checksums from example Cargo.lock files魏曹先生13 days6-24/+0
|
* chore(examples): add source and checksum to mingling_core/macros in魏曹先生2026-07-026-0/+24
| | | | Cargo.lock
* chore: run cargo fmt and rearrange re-exports in mingling魏曹先生2026-07-024-19/+20
|
* chore: bump version to 0.2.1 and switch deps to path魏曹先生2026-06-306-42/+18
|
* Released Mingling 0.2.00.2.0魏曹先生2026-06-306-0/+24
|
* refactor(core): move pathf module under builds and rename to build魏曹先生2026-06-293-52/+49
| | | | | | Migrate `mingling_core::pathf` into `mingling_core::builds::pathf` and re-export from `mingling::build`. Update all references from `mingling::builds` and `mingling::pathf` to `mingling::build`.
* fix(macros): pass pathf_map into dispatch tree generators魏曹先生2026-06-291-2/+25
|
* feat(pathf): add dispatch tree config and pass feature to analyzer魏曹先生2026-06-291-0/+17
| | | | | | | | Add `PathfinderConfig` struct to control dispatch tree extraction, and wire `use_dispatch_tree` through `DispatcherPattern`, `init_with_config`, and `analyze_and_build_type_mapping_for`. Expose config and wrapper from `mingling_core` under the `pathf` feature.
* chore: bump just_template to 0.2.0 across all examples and tests魏曹先生2026-06-292-4/+28
|
* fix(deps): bump just_template to 0.2.0 and migrate to new API魏曹先生2026-06-291-3/+3
|
* feat(pathf): add build-time type path resolution system魏曹先生2026-06-282-1/+13
| | | | | | | Add `mingling_pathf` sub-crate and `pathf` feature for automatic resolution of Mingling type module paths at build time. Scans source files, identifies macro invocations via pattern matchers, and generates mapping files consumed by `gen_program!()`.
* chore: clean up Cargo.toml metadata and update lockfiles魏曹先生2026-06-286-28/+28
|
* feat(workspace): add mingling_pathf crate and pathf feature魏曹先生2026-06-282-0/+6
|
* docs: improve documentation, mark internal items as `#[doc(hidden)]`魏曹先生2026-06-276-4/+65
| | | | | | | | Add module-level docs for the hook system, enhance doc examples for macros with usage syntax, fix typos in cross-references, and hide internal debugging macros and mock types from public documentation
* feat(macros): add async mutable resource injection for `#[chain]`魏曹先生2026-06-271-0/+38
| | | | | | | Support `&mut T` resource parameters in async chain functions by using an extract-store pattern that avoids holding mutable borrows across await points. Remove the previous compile-time rejection of this combination.
* feat: add From<()> for ChainProcess with empty result routing魏曹先生2026-06-271-1/+7
|
* fix(core): respect exit code when render output is suppressed魏曹先生2026-06-271-9/+16
|
* refactor(general_renderer): rename to structural_renderer魏曹先生2026-06-2622-185/+185
|
* feat(core): decouple structured output from Groupped trait魏曹先生2026-06-267-115/+105
| | | | | | | Introduce `StructuralData` sealed trait and `pack_structural!` / `group_structural!` / `derive(StructuralData)` macros to control structured rendering separately from grouping. `Groupped` no longer requires `Serialize`.
* Pass current context through hook control and support conversion魏曹先生2026-06-242-117/+216
|
* Redesign hook system with structured info types and ProgramControls魏曹先生2026-06-249-318/+817
|
* Move flag tests to separate module and clean up deref patterns魏曹先生2026-06-248-367/+366
|
* Replace macro_rules dispatch with proc-macro generation魏曹先生2026-06-231-73/+0
| | | | | | | | Generate `render()` and `do_chain()` match dispatch directly in `program_final_gen`, using a compile-time `ASYNC_ENABLED` constant to select the correct sync/async signature. Removes the `__dispatch_program_renderers!` and `__dispatch_program_chains!` macros from `mingling_core`.
* Remove unnecessary module wrapping for MockProgramCollect魏曹先生2026-06-201-91/+87
|
* Add shared `MockProgramCollect` and conditional `Groupped` bounds魏曹先生2026-06-207-258/+196
| | | | | | Extract duplicate `MockCollect` implementations into a reusable `MockProgramCollect` type. Conditionally require `Serialize` on the `Groupped` trait when the `general_renderer` feature is enabled.