camino-rs / camino

Like Rust's std::path::Path, but UTF-8.

Home Page:https://docs.rs/camino

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New version 1.1.0 fails to compile

teamplayer3 opened this issue · comments

When I try to compile my binary with the new version of camino, it fails with error:

error[E0658]: use of unstable library feature 'try_reserve_2'
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/camino-1.1.0/src/lib.rs:430:16
    |
430 |         self.0.try_reserve(additional)
    |                ^^^^^^^^^^^
    |
    = note: see issue #91789 <https://github.com/rust-lang/rust/issues/91789> for more information
    = help: add `#![feature(try_reserve_2)]` to the crate attributes to enable

Is it possible you are using an older nightly?

I just submitted #23 for this situation.

Yes, I'm on nightly 2022-06-09.

I have same issue, when compiling trunk with nightly 2022-06-15
image

commented

Thanks for the report. The PR linked above should fix this issue.

In general if you're pinning a nightly via rust-toolchain, it's also good to pin versions by checking in Cargo.lock (so you can stay on camino 1.0.9). Supporting nightlies past the point at which their version becomes stable is not something I'm going to put active effort towards, though I'll welcome patches to fix issues.

it's also good to pin versions by checking in Cargo.lock

Not sure how to do this when trying to compile a 3rd party binary like trunk (with cargo install trunk in my Gitlab CI runner) but I'll see if I can find a way.

Supporting nightlies past the point at which their version becomes stable is not something I'm going to put active effort towards

Understandable :)

commented

Oh for that you can use --locked , assuming that the crate was published before camino 1.1.0 was released.

cargo install trunk --locked

(I think locked should have been the default to begin with)

Oh for that you can use --locked , assuming that the crate was published before camino 1.1.0 was released.

cargo install trunk --locked

(I think locked should have been the default to begin with)

Ah, thank you very much. Trunk's website suggests using that command, but I didn't know what it meant 😂

commented

This is fixed as part of camino 1.1.1, which is now out. Thanks @smoelius for the PR and everyone for reporting the issue!