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

cargo-miri version information is outdated #3845

Closed
JoJoDeveloping opened this issue Aug 26, 2024 · 6 comments · Fixed by #3949
Closed

cargo-miri version information is outdated #3845

JoJoDeveloping opened this issue Aug 26, 2024 · 6 comments · Fixed by #3949
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) C-bug Category: This is a bug.

Comments

@JoJoDeveloping
Copy link
Contributor

JoJoDeveloping commented Aug 26, 2024

Would it be possible to add version information to miri? Currently, running miri --version forwards this flag to rustc, so it prints e.g.

$ miri --version
rustc 1.82.0-nightly (fdf61d499 2024-08-20)

which is not useful.

Instead, it would be nice to have miri --version and maybe even cargo miri version. My personal use-case is that I want to double-check that I am using the correct miri when I am making modifications to it to debug/test some other code somewhere else.

@RalfJung
Copy link
Member

RalfJung commented Aug 26, 2024

which is not useful.

Why not? The commit is in the rustc repo, which contains Miri, so it says exactly the commit you have to look at to find out which version of Miri rustup installed.

running miri --version forwards this flag to rustc

That's not quite right. There's no separate rustc binary we are forwarding this to. Miri is a rustc driver and so this shows the version of the rustc driver Miri is using.

@JoJoDeveloping
Copy link
Contributor Author

That's unfortunately not true if you build miri yourself, is it?

@RalfJung
Copy link
Member

Ah, yeah. But that's going to be a dev version anyway so the version should probably just say "dev" or so, similar to what local rustc builds do.

rustc 1.82.0-dev

@RalfJung
Copy link
Member

RalfJung commented Aug 26, 2024

Also note that cargo miri --version exists. That's just the version of cargo-miri though, it does not check the miri driver binary.

@JoJoDeveloping
Copy link
Contributor Author

Yes.. for me that prints

miri 0.1.0 (a84aba2f gpg: Signature made Mi 21 Aug 2024 21:08:09 CEST)

Which is interesting, but I can not even find the commit (or whatever it is) referenced there. In general, what repository do they belong to?

Also, the last change I made to the miri installation I ran this command in was today. So again, there's no way of getting the miri version.

@RalfJung
Copy link
Member

Generally, development versions don't have a version. That's deliberate, and consistent with rustc.

Which is interesting, but I can not even find the commit (or whatever it is) referenced there. In general, what repository do they belong to?

If you installed via ./miri install, it should be a commit in the Miri repo. However due to rust-lang/rust-clippy#13312 the commit may be outdated.

@RalfJung RalfJung changed the title Adding version information? cargo-miri version information is outdated Sep 1, 2024
@RalfJung RalfJung added C-bug Category: This is a bug. A-cargo Area: affects the cargo wrapper (cargo miri) labels Sep 1, 2024
@bors bors closed this as completed in 5c2f574 Oct 7, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants