aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src
Commit message (Collapse)AuthorAgeFilesLines
* feat(any): make `Grouped` trait unsafe and encapsulate `AnyOutput`魏曹先生34 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魏曹先生48 hours3-8/+24
| | | | | | | 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魏曹先生2 days1-1/+10
|
* feat(core, macros): add r_append! macro and RenderResult::append_other魏曹先生2 days1-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 days1-68/+376
| | | | | | | | | | 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 days2-0/+42
| | | | | | | | | | | | 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
* style: Reorder imports and reformat code with cargo fmt魏曹先生12 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: run cargo fmt and rearrange re-exports in mingling魏曹先生2026-07-024-19/+20
|
* 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.
* 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!()`.
* feat(workspace): add mingling_pathf crate and pathf feature魏曹先生2026-06-281-0/+3
|
* 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-2616-166/+166
|
* feat(core): decouple structured output from Groupped trait魏曹先生2026-06-265-110/+101
| | | | | | | 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-248-316/+815
|
* 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-205-135/+188
| | | | | | Extract duplicate `MockCollect` implementations into a reusable `MockProgramCollect` type. Conditionally require `Serialize` on the `Groupped` trait when the `general_renderer` feature is enabled.
* Move to_chain and to_render to Groupped trait魏曹先生2026-06-201-0/+16
|
* Add unit and integration tests for mingling_coreWeicao-CatilGrass2026-06-0921-0/+2540
|
* Add COMPLETION_SUBCOMMAND and is_completing methodWeicao-CatilGrass2026-06-092-0/+30
|
* Add get_args method to ProgramWeicao-CatilGrass2026-06-091-0/+6
|
* Remove misleading SAFETY comment in LazyRes force_initWeicao-CatilGrass2026-06-091-2/+2
|
* Replace `OnceLock<Option<Box<dyn Any>>>` with custom `ProgramCell` typeWeicao-CatilGrass2026-06-094-23/+107
| | | | | Reduces indirection and allows taking ownership of the program instance for proper cleanup before `process::exit()`
* Add on-drop callback support to `LazyRes`Weicao-CatilGrass2026-06-081-20/+145
|
* Refactor LazyRes to use enum and drop factory after init魏曹先生2026-06-071-72/+113
|
* Add LazyRes for lazy resource initialization魏曹先生2026-06-073-3/+148
|
* Remove unused import of ProgramPanic魏曹先生2026-06-071-4/+1
|