Skip to content

cargo run and cargo build don't seem to reflect recent changes #12090

@anandijain

Description

@anandijain

Problem

i've been using vscode and

anand@anands-MacBook-Pro ~/.c/d/lorenz (main)> cargo -V
cargo 1.69.0 (6e9a83356 2023-04-12)
anand@anands-MacBook-Pro ~/.c/d/lorenz (main)> rustup -V
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.69.0 (84c898d65 2023-04-16)`

and i have a simple lib. when i change some stuff then rerun cargo run it runs the old code.
i found this which seems similar to my issue
https://stackoverflow.com/questions/57087386/cargo-run-does-not-reflect-any-code-changes-in-main-rs

but in my case the only way that i reliably found to get cargo to register the changes is by deleting the target folder and rerunning.

happy to provide more information if needed! i am probably doing something silly (pretty new to rust) but im confused

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-bugCategory: bugE-easyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions