Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(builder): Fully recurse when building #3670

Merged
merged 2 commits into from May 1, 2022
Merged

Conversation

epage
Copy link
Member

@epage epage commented May 1, 2022

Besides addressing the panic from assuming things were built when they
weren't, this should fix some completion issues for some people.

Fixes #3669

@epage epage force-pushed the panic branch 2 times, most recently from c972e95 to 83b2188 Compare May 1, 2022 00:53
Besides addressing the panic from assuming things were built when they
weren't, this should fix some completion issues for some people.

Fixes clap-rs#3669
@epage epage merged commit b37c0a1 into clap-rs:master May 1, 2022
@epage epage deleted the panic branch May 1, 2022 01:20
self._build_self();
for subcmd in self.get_subcommands_mut() {
subcmd._build_self();
subcmd._build_recursive();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK The reason for not building everything was performance concerns. We only built the subcommands people were using.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two build paths. The incremental build path used by parsing and the "build all" build path used by completions, etc. They share _build_self but how they walk and how they generate bin names is separate.

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.

Clap 3.1.13 fails to build by unwrapping a None value
2 participants