kellpossible / cargo-i18n

A Rust Cargo sub-command and libraries to extract and build localization resources to embed in your application/library
MIT License
121 stars 25 forks source link

Cannot find function locate_crate_paths in crate i18n_config #65

Closed Casara closed 3 years ago

Casara commented 3 years ago

The following error is occurring when using version 0.11.0 of the i18n-embed sub crate:

error[E0425]: cannot find function `locate_crate_paths` in crate `i18n_config`
  --> /home/casara/.asdf/installs/rust/1.50.0/registry/src/github.com-1ecc6299db9ec823/i18n-embed-impl-0.7.0/src/lib.rs:32:41
   |
32 |     let config_file_path = i18n_config::locate_crate_paths()
   |                                         ^^^^^^^^^^^^^^^^^^ not found in `i18n_config`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `i18n-embed-impl`

The function locate_crate_paths was introduced in version 0.4.1 of the i18n-version sub crate as seen in the link.

However, in version 0.11.0 of i18n-embed, its sub crate i18n-embed-impl uses version 0.4.0 of i18n-config: https://github.com/kellpossible/cargo-i18n/blob/master/i18n-embed/i18n-embed-impl/Cargo.toml#L21.

Version 0.3.1 of the sub crate i18n-embed-fl is also using version 0.4.0 of i18n-config and calling the function locate_crate_paths: https://github.com/kellpossible/cargo-i18n/blob/master/i18n-embed-fl/Cargo.toml#L19.

For the time being, I solved it by adding version 0.4.1 of the i18n-config box to Cargo.toml.

kellpossible commented 3 years ago

@Casara thanks for reporting! A confusing dependency problem :thinking: Do you have any opinions on the best way to push a fix for this?

kellpossible commented 3 years ago

Have you tried doing a cargo update -p 18n-embed (or cargo update -p i18n-config)? I don't think any of the dependencies specified are specifically locked to 0.4.0 of i18n-config. Seems like maybe some kind of incompatibility in your lock file?

kellpossible commented 3 years ago

@Casara did you get a chance to look at this again?

Casara commented 3 years ago

@Casara did you get a chance to look at this again?

Not yet, I'm very busy at the moment. I do not know when I can stop to look at it again.

kellpossible commented 3 years ago

Okay no worries, I'm going to close this issue for now because I can't reproduce it, but if you do get a chance to look at it let me know and I'll re-open if needed.

kellpossible commented 3 years ago

I just ran into this issue updating one of my own projects. I was able to resolve it with cargo update -p i18n-config Looks like there was probably a breaking change in i18n-config that needed a bigger version bump.