Posted on :: Tags: , , , , ,

🐢 Should we go into completions directly, or do we have anything to update in the working scripts?

🐇 Starting with completions is better. One question I have is whether the completions work for subcommands as usual, like in the static completions.

🐢 Yes, they work. We need to add

source <(COMPLETE=zsh xvc)

to .zshrc though.

🐇 It looks we can drop xvc completions command. We’re just checking the COMPLETE environment variable and no need for a separate command in this case.

🐢 Yes, let’s remove that.

🐇 Maybe we can employ completions module for all completion related functionality. It’s a separate thing, you know.

🐢 Which completions do we need?

🐇 We can just mark them with TODOs now.

🐢 Yes, let’s check where we need completions and what.

🐇 I noticed we’re repeating options in XvcFileCLI and some of the options are missing, e.g., --from-ref and --to-branch.

🐢 Because it can compile a different binary and global options don’t work that way. Maybe we can move all these binaries under different files under lib. We can have feature flags to turn off certain features and compile different binaries.

🦊 Let’s search it. I didn’t see it before: building different binaries with feature flags with cargo

🐢 There is no clear cut solution but we can move all binaries to the root with https://rustwiki.org/en/cargo/reference/cargo-targets.html#the-required-features-field it looks.

🐲 We can postpone this to another release.

🐇 Yes, let’s not spend time for this now.

🐢 Should we try making pipeline_name a global option? It’s repeating everywhere.

🐇 That will make it easier to maintain.

🐢 We’ll have to pass pipeline_name to subcommands though.

🐇 I think we can have a set of global options that we can pass. For the time being, that’s only the pipeline_name.

🐢 Ok. Let’s do this.

🐇 A similar option is the step name for pipeline steps.

🐢 Dependencies will need a revamp in the next version anyways. So let’s keep it for now.

🐲 Also the semantics of step-name is different for these commands. step new interprets it as a new name, while step dependency interprets it as an existing name. The first can be renamed to --name and the second can be --to as one of its aliases suggest.

🐢 Yes, let’s keep it for now and we’ll continue to work on others.

🦊 I want to ask a comment in clap discussions.

🐢 Wrote it. Now let’s build it after changing the pipeline_name

🐇 It compiles. Should we test it?

🐢 I think we’ll test after all these completion work is done.

🐇 We did most of the strum related completion.

🐢 Didn’t test them yet though

🐇 This is Rust. It will work if it’s compiles and it compiles.