GSoC 2024 Cargo Completions Notes

General availability: https://lettucemeet.com/l/e49bd

Parent issues

Ed's work schedule: 9am Central US to 5pm Central US
Ed's extended schedule: 7pm-9pm (on a when available basis)

Syncs

2024-05-22

Starting point: https://github.com/clap-rs/clap/issues/3920

2024-05-31

  • Review how other custom completers design their dynamic completion parts and design a good dynamic completion: https://github.com/clap-rs/clap/discussions/5512

  • Confirm the features of the existing completion scripts for Cargo commands. These need to be considered when designing the dynamic completion for clap_complete.

Q: For value completion in Cargo commands, many require executing some functions to obtain the possible values list. We might need to implement the possible_values method of the TypedValueParser trait for Fn(&str) -> Result<T, E> + Clone + Send + Sync + 'static to support user-defined closures or functions for obtaining possible values.

2024-06-07

2024-06-21

Three branches

2024-07-05

  • Adding of shells needs feature comparison with static completion shell support and either not close out issue or create separate issues for things not done in PRs
  • Added documentation task to tracking issue
  • For https://github.com/clap-rs/clap/pull/5539
    • Suggested holding off on extra ways of doing values so we can close out the PR

2024-07-12

2024-07-19

2024-07-26

2024-08-02

  • Back to school Aug 9th
  • Next:
    • Custom completers
    • Test it out in Cargo
trait CustomCompleter { fn completions(&self) -> Vec<CompletionCandidate>; } impl<F> CustomCompleter for F where F: Fn() -> Vec<CompletionCandidate> { fn completions(&self) -> Vec<CompletionCandidate> { (self)() } }

2024-08-16

2024-08-26

2024-08-30

2024-09-09

  • Testing in cargo
    • CompleteEnv, needs end to end
    • Maybe needs all shells for registration command?
    • Otherwise, only needs one shell and one end-to-end test
    • If only 1-5 tests, don't need a file per sub-feature or shell
Select a repo