Skip to content

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

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

Closed
Banyc opened this issue Nov 17, 2024 · 0 comments · Fixed by #6869
Closed

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

Banyc opened this issue Nov 17, 2024 · 0 comments · Fixed by #6869

Comments

@Banyc
Copy link
Contributor

Banyc commented Nov 17, 2024

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" }
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.

1 participant