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

Failed local installation due to mismatched types compilation error #1211

Closed
quietlychris opened this issue Feb 25, 2024 · 1 comment · Fixed by #1216
Closed

Failed local installation due to mismatched types compilation error #1211

quietlychris opened this issue Feb 25, 2024 · 1 comment · Fixed by #1216

Comments

@quietlychris
Copy link

Hello,

I'm currently running into issues trying to install Martin locally using cargo install.

error[E0308]: mismatched types
  --> /home/chrism/.cargo/registry/src/index.crates.io-6f17d22bba15001f/martin-0.13.0/src/fonts/mod.rs:83:39
   |
83 |         if face.get_char_index(cp) != 0 {
   |            -----------------------    ^ expected `Result<NonZero<u32>, Error>`, found integer
   |            |
   |            expected because this is `std::result::Result<std::num::NonZero<u32>, pbf_font_tools::freetype::Error>`
   |
   = note: expected enum `std::result::Result<std::num::NonZero<u32>, pbf_font_tools::freetype::Error>`
              found type `{integer}`

I've tested this on rustc 1.78.0 stable and nightly, and on Martin v0.13, 0.12, and 0.11 on a fresh Ubuntu 22.04 install (via cargo install --version=^0.11/12/13 martin), all of which are thowing the same error. This appears to be the same sort of error mode reported at huggingface/text-generation-inference#840 , although I don't believe Martin uses the tokenizers crate and I had trouble trying to find which dependency version might be the cause (maybe pbf_font_tools?).

Thanks for your consideration, and I can provide any add'l information, just let me know!

@nyurik
Copy link
Member

nyurik commented Feb 26, 2024

Yep, a dependency crate was released that broke semver - I filed a bug PistonDevelopers/freetype-rs#272

Use cargo install martin --locked or better yet cargo binstall martin (you will need to install binstall)

To reproduce this issue locally:

git checkout v0.13.0
cargo update
cargo check

I will update the docs to mention the --locked param.

nyurik added a commit that referenced this issue Feb 27, 2024
This will prevent installation issues in case dependencies break semver
promise

Fixes #1211
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 a pull request may close this issue.

2 participants