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

Support for completions #248

Merged
merged 2 commits into from Aug 23, 2022
Merged

Support for completions #248

merged 2 commits into from Aug 23, 2022

Conversation

Jedsek
Copy link
Contributor

@Jedsek Jedsek commented Aug 22, 2022

Again :)

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 22, 2022

I help you reduce clap's feature, because crate_version! is just a simple macro:

#[cfg(feature = "cargo")]
#[macro_export]
macro_rules! crate_version {
    () => {
        env!("CARGO_PKG_VERSION")
    };
}

Just replace it by using env!

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 22, 2022

And now, no clippy warnings :)

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 22, 2022

Also, I changed the edition form 2018 to 2021 in Cargo.toml and it could be compiled successfully.

@bootandy
Copy link
Owner

Looks like the old 32 bit builds are broken. (i686) ( Could this be the change from 2018-> 2021 ? )

@bootandy
Copy link
Owner

I don't think its the edition change as I opened a separate PR for that: #249

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 22, 2022

I fix the max depth.
(I just thought about 64 bit before)

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 22, 2022

Because a proble of clap, we could't set the default value of depth (When use a function which return value is a Command, because lifetime, see clap-rs/clap#2150)

So I changed the build_cli's signature to accept a new argument: max_depth to avold this problem. Otherwise, I think I have to add a dependencies const_format to achieve the same purpose.

@Jedsek
Copy link
Contributor Author

Jedsek commented Aug 23, 2022

@bootandy All checks have passed, this pr could be merged

@bootandy bootandy merged commit f60184e into bootandy:master Aug 23, 2022
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.

None yet

2 participants