diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-17 05:51:36 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-17 05:51:36 +0800 |
| commit | db84beb600532f2366babd9a6563214bee1f3732 (patch) | |
| tree | adf20172ad20d41cebc8beebc514e4972b2a17bb /docs/dev/pages/issues/_remove-with-dispatcher.md | |
| parent | 57c53affe3542cb6bd4e79ee4c18f20a1bd76b2d (diff) | |
docs(sidebar): mark completed issues and reorder them
Diffstat (limited to 'docs/dev/pages/issues/_remove-with-dispatcher.md')
| -rw-r--r-- | docs/dev/pages/issues/_remove-with-dispatcher.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/dev/pages/issues/_remove-with-dispatcher.md b/docs/dev/pages/issues/_remove-with-dispatcher.md new file mode 100644 index 0000000..b0d972f --- /dev/null +++ b/docs/dev/pages/issues/_remove-with-dispatcher.md @@ -0,0 +1,35 @@ +<h1 align="center">[T0] Remove with_dispatcher and with_dispatchers</h1> +<p align="center"> + Breaking: make <code>Dispatcher</code> registration compile-time collected in all modes +</p> + +> [!NOTE] +> +> This is a **Breaking Change** planned for Mingling 0.5.0. + +## Background + +Mingling's commands must be registered through `with_dispatcher` in order to be usable when `dispatcher_tree` is disabled. This has always been a strange semantic: `chain`, `renderer`, `help`, `completion`, and `metadata` are all collected at compile time, so why is `Dispatcher` the exception? + +In fact, during usage of `dispatcher` from 0.1.0 to 0.4.0, no scenario has ever been encountered where **dynamic registration** was necessary. It is considered unnecessary. + +## Plan + +Make `Dispatcher` registration also compile-time collected in non-`dispatcher_tree` states starting from 0.5.0, and remove `with_dispatcher` / `with_dispatchers` (and the related `#[program_setup]` registration path if it becomes obsolete). + +## Tasks + +- [x] Design how dispatchers are collected at compile time when `dispatcher_tree` is disabled (consistent with how `chain` / `renderer` / `completion` / `metadata` are collected) +- [x] Remove `with_dispatcher` and `with_dispatchers` from the `Program` API +- [x] Update `gen_program!` and the macros so registration happens automatically +- [x] Migrate examples, tests, and docs that call `with_dispatcher` / `with_dispatchers` +- [x] Verify both `dispatcher_tree`-enabled and disabled modes behave identically + +## 🕘 Progress + +- [x] In Progress +- [x] Complete + +<p align="center" style="font-size: 0.85em; color: gray;"> + Written by @Weicao-CatilGrass +</p> |
