containers / podlet

Generate Podman Quadlet files from a Podman command, compose file, or existing object
https://crates.io/crates/podlet
Mozilla Public License 2.0
322 stars 10 forks source link

podlet fails to compile due to IndexMap version #24

Closed mbussolotto closed 7 months ago

mbussolotto commented 8 months ago

running cargo install podlet I had this error:

error[E0308]: mismatched types
   --> /home/mbussolotto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/podlet-0.2.0/src/cli/k8s.rs:832:49
    |
832 |         .chain(driver_opts_try_into_annotations(compose_volume.driver_opts))
    |                -------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `IndexMap<String, Option<SingleValue>>`, found a different `IndexMap<String, Option<SingleValue>>`
    |                |
    |                arguments to this function are incorrect
    |
    = note: `IndexMap<String, Option<SingleValue>>` and `IndexMap<String, Option<SingleValue>>` have similar names, but are actually distinct types
note: `IndexMap<String, Option<SingleValue>>` is defined in crate `indexmap`
   --> /home/mbussolotto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-2.1.0/src/map.rs:81:1
    |
81  | pub struct IndexMap<K, V, S = RandomState> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `IndexMap<String, Option<SingleValue>>` is defined in crate `indexmap`
   --> /home/mbussolotto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.3/src/map.rs:71:1
    |
71  | pub struct IndexMap<K, V, S = RandomState> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `indexmap` are being used?
note: function defined here
   --> /home/mbussolotto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/podlet-0.2.0/src/cli/k8s.rs:861:4
    |
861 | fn driver_opts_try_into_annotations(
    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
862 |     driver_opts: IndexMap<String, Option<SingleValue>>,
    |     --------------------------------------------------

For more information about this error, try `rustc --explain E0308`.
error: could not compile `podlet` (bin "podlet") due to previous error
error: failed to compile `podlet v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installqBjk89`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Fix: https://github.com/k9withabone/podlet/pull/25

mbussolotto commented 7 months ago

close, already fixed i v0.21