Skip to content
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

Compilation breaks after update from 0.76 to 0.77 #13493

Closed
secana opened this issue Feb 26, 2024 · 2 comments · Fixed by #13494
Closed

Compilation breaks after update from 0.76 to 0.77 #13493

secana opened this issue Feb 26, 2024 · 2 comments · Fixed by #13494
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@secana
Copy link

secana commented Feb 26, 2024

Problem

Hi, maintainer of Kellnr here.

While updating the dependencies of Kellnr, I ran into an issue with the cargo dependency. No code was changed, just an update from cargo 0.76 to 0.77. Before the update, everything works fine, after the update the following error occurs:

error[E0425]: cannot find function `du` in crate `cargo_util`
    --> /Users/x/.cargo/registry/src/kellnr-dev.raspi.home-1baa2a94dc16fc7f/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1212:36
     |
1212 |             let size = cargo_util::du(&base.git_db.join(&info.3), &[])?;
     |                                    ^^ not found in `cargo_util`
     |
help: consider importing this function
     |
117  + use crate::core::global_cache_tracker::du;
     |
help: if you import `du`, refer to it directly
     |
1212 -             let size = cargo_util::du(&base.git_db.join(&info.3), &[])?;
1212 +             let size = du(&base.git_db.join(&info.3), &[])?;
     |

error[E0425]: cannot find function `du` in crate `cargo_util`
    --> /Users/x/.cargo/registry/src/kellnr-dev.raspi.home-1baa2a94dc16fc7f/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1818:17
     |
1818 |     cargo_util::du(&path, &["!.git"])
     |                 ^^ not found in `cargo_util`

error[E0425]: cannot find function `du` in crate `cargo_util`
    --> /Users/x/.cargo/registry/src/kellnr-dev.raspi.home-1baa2a94dc16fc7f/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1825:21
     |
1825 |         cargo_util::du(&path, &[])
     |                     ^^ not found in `cargo_util`

    Checking migration v0.1.0 (/Users/x/repos/kellnr/kellnr/crates/db/migration)
For more information about this error, try `rustc --explain E0425`.
error: could not compile `cargo` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

Steps

  1. Checkout git@github.com:kellnr/kellnr.git
  2. Upgrade from cargo 0.76 to 0.77
  3. Compile -> See error above

Possible Solution(s)

Revert to cargo 0.76

Notes

No response

Version

cargo 1.76.0 (c84b36747 2024-01-18)
release: 1.76.0
commit-hash: c84b367471a2db61d2c2c6aab605b14130b8a31b
commit-date: 2024-01-18
host: aarch64-apple-darwin
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0 (sys:0.4.70+curl-8.5.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Mac OS 14.3.1 [64-bit]
@secana secana added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Feb 26, 2024
@weihanglo
Copy link
Member

That is likely to be cargo@0.77.0 actually depends on cargo-util@0.2.9 but somehow we failed to bump the version there:

cargo-util = { version = "0.2.6", path = "crates/cargo-util" }

Running cargo update --precise 0.2.9 cargo-util should fix the issue.

@secana
Copy link
Author

secana commented Feb 26, 2024

Thanks for the fast response. That fixed it. Not sure if I should close the issue, or you want to keep it open until the dependency is bumped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants