Skip to content

Conversation

@sermuns
Copy link
Contributor

@sermuns sermuns commented Jan 17, 2026

I followed the simple example from https://github.com/clap-rs/clap/blob/master/clap_complete/examples/completion-derive.rs.

Problem is, the main command seems to be too big, causing a runtime stack overflow when trying to generate completions...

$ cargo run -- completions bash
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.62s
     Running `/home/sermuns/.cache/cargo/debug/dx completions bash`

thread 'main' (2234839) has overflowed its stack
fatal runtime error: stack overflow, aborting
$ cargo run --release -- completions bash
   Compiling dioxus-cli v0.7.3 (/home/sermuns/Git/dioxus/packages/cli)
    Finished `release` profile [optimized] target(s) in 9.92s
     Running `/home/sermuns/.cache/cargo/release/dx completions bash`

thread 'main' (2234993) has overflowed its stack
fatal runtime error: stack overflow, aborting

Fixes #5061 (once I have figured out a solution for the stack overflow...)

@ealmloff
Copy link
Member

That may be caused by the @server and @client subcommands which use ChainedCommand to match recursively

@sermuns
Copy link
Contributor Author

sermuns commented Jan 19, 2026

Sounds like a reasonable culprit, let me investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add shell-completions

2 participants