aboutsummaryrefslogtreecommitdiff
path: root/docs/dev-docs/pages/issues
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev-docs/pages/issues')
-rw-r--r--docs/dev-docs/pages/issues/the-mod-pathfinder.md10
-rw-r--r--docs/dev-docs/pages/issues/the-shit-time.md14
2 files changed, 12 insertions, 12 deletions
diff --git a/docs/dev-docs/pages/issues/the-mod-pathfinder.md b/docs/dev-docs/pages/issues/the-mod-pathfinder.md
index 5f8c902..676251d 100644
--- a/docs/dev-docs/pages/issues/the-mod-pathfinder.md
+++ b/docs/dev-docs/pages/issues/the-mod-pathfinder.md
@@ -27,13 +27,13 @@ mod sub {
mingling::macros::pack!(ResultMyName = String); // directly creates ..::sub::ResultMyName
}
```
-
+
There are a few exceptions, such as the implicit Dispatcher provided by `extra_macros`, but these can be inferred from the node name:
```rust
dispatcher!("remote.add"); // although the type is unknown, we can infer CMDRemoteAdd and EntryRemoteAdd
```
-
+
And also `#[program_setup]`:
```rust
@@ -42,7 +42,7 @@ fn custom_setup(program: &mut Program<ThisProgram>) {
program.with_dispatchers((CMD1, CMD2, CMD3, CMD4, CMD5));
}
```
-
+
## Pathf Output Format
Uses TOML key-value pairs, formatted as follows:
@@ -50,13 +50,13 @@ Uses TOML key-value pairs, formatted as follows:
```toml
ResultRemoteAdd = "crate::mymod::ResultRemoteAdd"
```
-
+
Recommended storage location is under the target directory:
```
/target/{target}/{crate-name}/type-mapping.toml
```
-
+
## Other Issues
This solution is limited to Mingling's own syntax system. If types like `dispatcher!`, `pack!` are indirectly expanded through macros, the analyzer will not be able to discover them.
diff --git a/docs/dev-docs/pages/issues/the-shit-time.md b/docs/dev-docs/pages/issues/the-shit-time.md
index 77a8af9..f524f42 100644
--- a/docs/dev-docs/pages/issues/the-shit-time.md
+++ b/docs/dev-docs/pages/issues/the-shit-time.md
@@ -23,7 +23,7 @@ completion:
--help -h --- Display helps
--version -V --- Display versions
```
-
+
Currently, there is no workaround.
Ideal solution:
@@ -34,7 +34,7 @@ fn complete(ctx: &ShellContext) -> Suggest {
// ...
}
```
-
+
---
## Why can't I register descriptions for commands?
@@ -50,7 +50,7 @@ mycmd <tab>
completion:
add rm list <--- You cannot register descriptions for commands
```
-
+
Expected behavior:
```
@@ -60,7 +60,7 @@ add --- Add something
rm --- Remove something
list --- List something
```
-
+
Ideal solution:
```rust
@@ -70,11 +70,11 @@ dispatcher! {
/// Add Something <--- How to i18n?
"add", CMDAdd => EntryAdd
}
-
+
// Ideally, it should satisfy the following two conditions:
// 1. No need to use `with_dispatcher`, because `with_dispatcher` is disabled in `dispatch_tree` mode
// 2. Must be able to accept String or &str at runtime
-
+
// Current idea
#[inline(always)]
#[dispatcher_desc(EntryAdd)]
@@ -82,7 +82,7 @@ fn desc_add() -> String {
// If using rust_i18n
t!("cmd.add.desc")
}
-
+
// Collected and generated by `gen_program!()`
// Generate something like get_dispatcher_desc(id: &ThisProgram) -> String
// Match the corresponding function using enum values inside ThisProgram