gnzlbg / cargo-asm

cargo subcommand showing the assembly or llvm-ir generated for Rust code
https://github.com/gnzlbg/cargo-asm
Other
1.17k stars 36 forks source link

cargo-asm doesn't always recompile if a file is changed #196

Open fogti opened 4 years ago

fogti commented 4 years ago

I have a project, and I tried comparing the assembler output between different releases/tags, but a simple git checkout wasn't enough to invoke a recompilation.

I switched to the following commands, which work (but is a bit too much brute force):

VER=v0.5.0 # next invocation was with VER=v0.5.1
git checkout "$VER" && \
  cargo clean && \
  cargo test && \
  cargo asm indented_blocks::parse_nested_blocks &> "../ib_pnb_$VER.S"
unset VER

The following should've worked as well, but didn't:

VER=v0.5.0
git checkout "$VER" && cargo asm indented_blocks::parse_nested_blocks &> "../ib_pnb_$VER.S"
unset VER

This might be easier to check just using line numbers, which should be different between v0.5.0 and v0.5.1 (at least on x86_64).