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

Build error #1597

Closed
jdiez17 opened this issue Sep 19, 2024 · 5 comments
Closed

Build error #1597

jdiez17 opened this issue Sep 19, 2024 · 5 comments

Comments

@jdiez17
Copy link

jdiez17 commented Sep 19, 2024

Current behavior 😯

cargo install --git https://github.com/jaskij/cargo-bitbake.git (which transitively depends on gix-path) fails to build:

error[E0283]: type annotations needed
  --> /home/rosdev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.23.1/src/program/mod.rs:83:63
   |
83 |                 gix_command::prepare(gix_path::from_bstr(args.as_ref()).into_owned())
   |                                                               ^^^^^^
   |
   = note: multiple `impl`s satisfying `BString: AsRef<_>` found in the `bstr` crate:
           - impl AsRef<BStr> for BString;
           - impl AsRef<[u8]> for BString;
help: try using a fully qualified path to specify the expected types
   |
83 |                 gix_command::prepare(gix_path::from_bstr(<BString as AsRef<T>>::as_ref(&args)).into_owned())
   |                                                          +++++++++++++++++++++++++++++++    ~

error[E0283]: type annotations needed
   --> /home/rosdev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-credentials-0.23.1/src/program/mod.rs:83:38
    |
83  |                 gix_command::prepare(gix_path::from_bstr(args.as_ref()).into_owned())
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for reference `&_`
    |
    = note: multiple `impl`s satisfying `Cow<'_, BStr>: From<&_>` found in the `bstr` crate:
            - impl<'a> From<&'a BStr> for Cow<'a, BStr>;
            - impl<'a> From<&'a BString> for Cow<'a, BStr>;
    = note: required for `&_` to implement `Into<Cow<'_, BStr>>`
note: required by a bound in `from_bstr`
   --> /home/rosdev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-path-0.10.11/src/convert.rs:135:34
    |
135 | pub fn from_bstr<'a>(input: impl Into<Cow<'a, BStr>>) -> Cow<'a, Path> {
    |                                  ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_bstr`

Expected behavior 🤔

Build is successful

Git behavior

N/A

Steps to reproduce 🕹

cargo install --git https://github.com/jaskij/cargo-bitbake.git

@Byron
Copy link
Owner

Byron commented Sep 19, 2024 via email

@NoelJacob
Copy link

I got it too with a tool having it as dependency

@jdiez17
Copy link
Author

jdiez17 commented Sep 19, 2024

Thanks for the fast reply!
I haven't tried with --locked, but what fixed it for me was updating the git2 dependency from 0.18.3 to 0.19.0.
Still, it may be that there's a bug in the gitoxide version that git2@0.18.3 depends.

@Skgland
Copy link

Skgland commented Sep 19, 2024

I think this might be related to #1466 #1467

@Byron
Copy link
Owner

Byron commented Sep 20, 2024

I am glad it works now!

Unfortunately these build issues occor from time to time and one may hope that it will the chance of this will decrease over time.

Meanwhile, I think there is nothing left to be done here, so I am closing the issue. Please feel free to keep posting if anything new comes up.

@Byron Byron closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
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

No branches or pull requests

4 participants