-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bug: uu_cp v0.0.27 attempts to import uucore v0.0.28 #6867
Copy link
Copy link
Closed
Description
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
cargo installrunscargo updatefirst before actually compiles the crates.uu_cpdepends on auucorewhose version can be almost any incompatible versions
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" }Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels