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

Panic at "cannot update precise" in rust-lang/rust #12920

Closed
Noratrieb opened this issue Nov 6, 2023 · 6 comments
Closed

Panic at "cannot update precise" in rust-lang/rust #12920

Noratrieb opened this issue Nov 6, 2023 · 6 comments
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-bug Category: bug Command-update P-high Priority: High regression-from-stable-to-nightly Regression in nightly that previously worked in stable. S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@Noratrieb
Copy link
Member

Problem

When running cargo update -p icu_provider --precise 1.2.0 inside my rust-lang rust branch, I get

    Updating crates.io index
thread 'main' panicked at src/cargo/util/semver_ext.rs:79:9:e; 5 pending                                                          
cannot update_precise ~1.3.2 to 1.2.0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps

  1. checkout Noratrieb/rust@4023334
  2. cargo update -p icu_provider --precise 1.2.0

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.75.0-nightly (65e297d1e 2023-11-03)
release: 1.75.0-nightly
commit-hash: 65e297d1ec0dee1a74800efe600b8dc163bcf5db
commit-date: 2023-11-03
host: aarch64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Ubuntu 22.04 (jammy) [64-bit]
@Noratrieb Noratrieb added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Nov 6, 2023
@ehuss
Copy link
Contributor

ehuss commented Nov 6, 2023

This seems to have regressed in rust-lang/rust#117302 via #12749. cc @Eh2406

@ehuss ehuss added Command-update regression-from-stable-to-nightly Regression in nightly that previously worked in stable. P-high Priority: High S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed S-triage Status: This issue is waiting on initial triage. labels Nov 6, 2023
@Eh2406
Copy link
Contributor

Eh2406 commented Nov 6, 2023

Sorry. I will look into this!

@Eh2406
Copy link
Contributor

Eh2406 commented Nov 6, 2023

Rustc is a big project with many moving pieces, and not when I contribute to regularly. I could use some help reproducing this issue. I checked out the commit @Nilstrieb link to but I cannot get anything to run. Stable complains about the use of public dependencies, nightly complaints about

error: failed to get `std_detect` as a dependency of package `std v0.0.0 (/local/home/jfinkelm/Cargo/rust/library/std)`

Caused by:
  failed to load source for dependency `std_detect`

Caused by:
  Unable to update /local/home/jfinkelm/Cargo/rust/library/stdarch/crates/std_detect

Caused by:
  failed to read `/local/home/jfinkelm/Cargo/rust/library/stdarch/crates/std_detect/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

with similar errors for locally compiled cargoes both before and after my PR.
Can someone give instructions to reproduce the problem, or create a self-contained example?

@weihanglo
Copy link
Member

you might want to run something like

git submodule init
git submodule update library/stdarch

(sorry I am always forgetting the actual git command that works…)

@Eh2406
Copy link
Contributor

Eh2406 commented Nov 6, 2023

Thank you, that helped! Now I am getting:

> cargo-befor update -p icu_provider --precise 1.2.0 
    Updating crates.io index
error: failed to select a version for the requirement `icu_provider = "~1.3.2"`
candidate versions found which didn't match: 1.2.0
location searched: crates.io index
required by package `icu_provider_adapters v1.3.2`
    ... which satisfies dependency `icu_provider_adapters = "^1.2"` (locked to 1.3.2) of package `rustc_error_messages v0.0.0 (/local/home/jfinkelm/Cargo/rust/compiler/rustc_error_messages)`
    ... which satisfies path dependency `rustc_error_messages` (locked to 0.0.0) of package `rustc_errors v0.0.0 (/local/home/jfinkelm/Cargo/rust/compiler/rustc_errors)`
    ... which satisfies path dependency `rustc_errors` (locked to 0.0.0) of package `rustc_codegen_ssa v0.0.0 (/local/home/jfinkelm/Cargo/rust/compiler/rustc_codegen_ssa)`
    ... which satisfies path dependency `rustc_codegen_ssa` (locked to 0.0.0) of package `rustc-main v0.0.0 (/local/home/jfinkelm/Cargo/rust/compiler/rustc)`
perhaps a crate was updated and forgotten to be re-vendored?

and

> cargo-after update -p icu_provider --precise 1.2.0 
    Updating crates.io index
thread 'main' panicked at src/cargo/util/semver_ext.rs:79:9:
cannot update_precise ~1.3.2 to 1.2.0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Eh2406 Eh2406 added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Nov 6, 2023
@Eh2406 Eh2406 mentioned this issue Nov 6, 2023
bors added a commit that referenced this issue Nov 6, 2023
Bug 12920

Fix for #12920, a regression introduced in #12749.

This also as a test case for an existing Terrible error message.
@weihanglo
Copy link
Member

Fixed via #12923.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-bug Category: bug Command-update P-high Priority: High regression-from-stable-to-nightly Regression in nightly that previously worked in stable. S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

No branches or pull requests

4 participants