Skip to content

Bug: uu_cp v0.0.27 attempts to import uucore v0.0.28 #6867

@Banyc

Description

@Banyc

Background

   Compiling uu_cp v0.0.27
error[E0004]: non-exhaustive patterns: `UpdateMode::ReplaceNoneFail` not covered
    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uu_cp-0.0.27/src/cp.rs:1875:23
     |
1875 |                 match options.update {
     |                       ^^^^^^^^^^^^^^ pattern `UpdateMode::ReplaceNoneFail` not covered
     |
note: `UpdateMode` defined here
    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uucore-0.0.28/src/lib/features/update_control.rs:53:1
     |
53   | pub enum UpdateMode {
     | ^^^^^^^^^^^^^^^^^^^
...
62   |     ReplaceNoneFail,
     |     --------------- not covered
     = note: the matched value is of type `UpdateMode`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
     |
1914 ~                     },
1915 +                     UpdateMode::ReplaceNoneFail => todo!()
     |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `uu_cp` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `nu v0.100.0`, intermediate artifacts can be found at `/tmp/cargo-installQrk2JK`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Reasoning

When cargo install a crate relying on uu_cp v0.0.27, due to the import rule, uucore v0.0.28 was imported as the latest version at the time. Reading the compiling error, the two crates are not compatible.

Solution

Anchor the versions as the following:

uucore = { version = "0.0.28", package = "uucore", path = "src/uucore" }
uucore_procs = { version = "0.0.28", package = "uucore_procs", path = "src/uucore_procs" }
uu_ls = { version = "0.0.28", path = "src/uu/ls" }
uu_base32 = { version = "0.0.28", path = "src/uu/base32" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions