Skip to content

Cargo gets confused about hashes when switching between toolchain versions #9085

Closed
@jyn514

Description

@jyn514

Problem

error[E0460]: found possibly newer version of crate `la_arena` which `profile` depends on
   --> crates/syntax/src/algo.rs:126:18
    |
126 |         let _p = profile::span("into_text_edit");
    |                  ^^^^^^^
    |
    = note: perhaps that crate needs to be recompiled?
    = note: the following crate versions were found:
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-30ef6779a35b7e2f.rmeta
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-af7c500c62bd5e59.rmeta
            crate `la_arena`: /home/joshua/.local/lib/cargo/target/debug/deps/libla_arena-af7c500c62bd5e59.rlib
            crate `profile`: /home/joshua/.local/lib/cargo/target/debug/deps/libprofile-6846f1b303b1dfdb.rmeta

error: aborting due to previous error

Steps

I am not able to replicate this. The original steps I did were something like this:

  1. git clone https://github.com/rust-analyzer/rust-analyzer/ && cd rust-analyzer
  2. cargo +stable doc --document-private-items
  3. git fetch origin pull/7341/head && git checkout FETCH_HEAD
  4. cargo +nightly doc --document-private-items
  5. cargo +stable doc --document-private-items

But I tried running that again and it works fine now, so I don't know what went wrong. Probably this is related to incremental somehow? Let me know if this should be moved to rust-lang/rust.

Possible Solution(s)

🤷

Notes

I don't understand how I constantly run into bugs the first time I compile a project 🤦 Not always cargo bugs. But always bugs. The last one was #8838, the one before was rust-lang/rust#71819, the one before that was rust-lang/docs.rs#432. I think hello world worked, though.

Output of cargo version:

> cargo +stable --version
cargo 1.49.0 (d00d64df9 2020-12-05)
> cargo +nightly --version
cargo 1.50.0-nightly (75d5d8cff 2020-12-22)

Ubuntu 20.04, x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingC-bugCategory: bugS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions