Skip to content

Cargo / Rustc Version Mismatching #204

@alkaris2

Description

@alkaris2

Got some weird issue here where trying to run the MegaAntiCheat backend and it's getting a version mismatch reading for Cargo and Rustc.

So I was previously on Rustc version 1.78.0, same with Cargo, but after updating for rustc 1.85.1 (4eb161250 2025-03-15) and cargo 1.85.1 (d73d2caf9 2024-12-31) and ran the update for the backend while in the directory so it pulls the latest updates from Git repository, it still thinks my Rustc and Cargo versions are still on 1.87.0 when it's not.

What's weirder is if I cd out of the directory and run rustc -V && cargo -V they report the correct updated version, but cd into the directory and it reports incorrect version. I'm not entirely sure WHY it reports the wrong version, I even pointed to the binary executable that is the correct version because running which cargo && which rustc they both point to /usr/bin/cargo and /usr/bin/rustc

Rustc & Cargo version mismatch

I think the culprit of this is the rust-toolchain.toml file after updating, since it seems to NOT be using what's currently installed on my system, and using a different version even though it points to the same location of the one installed on the system. Because if I change the rustc version in the rust-toolchain.toml and run cargo run only then it seems to work correctly. Probably might want to add a fix script to detect the correct and currently installed versions so that TOML file gets updated and points to the correct version when cargo update is ran.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions