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

Recompiles workspace crates every time #198

Closed
Eugeny opened this issue Jul 24, 2022 · 8 comments · Fixed by #214
Closed

Recompiles workspace crates every time #198

Eugeny opened this issue Jul 24, 2022 · 8 comments · Fixed by #214
Labels
C-question Category: A question

Comments

@Eugeny
Copy link

Eugeny commented Jul 24, 2022

Currently, running cargo llvm-cov run recompiles the workspace crates every time, making merging multiple runs with --no-report and --no-run --html unfeasible.

@taiki-e
Copy link
Owner

taiki-e commented Jul 24, 2022

Could you provide an example to reproduce this?

Also, old results will be removed unless you pass --no-report to cargo llvm-cov run.

cargo llvm-cov run --no-report -- a
cargo llvm-cov run --no-report -- b
cargo llvm-cov --no-run --html

@taiki-e taiki-e added the C-question Category: A question label Jul 24, 2022
@Eugeny
Copy link
Author

Eugeny commented Jul 24, 2022

I've got the repro ready and then tried putting --no-report after run, and it worked! Shame on me.

Might still be unexpected behaviour however, that:

  • --no-report before run is silently ignored and
  • --no-report affects whether a rebuild happens

@taiki-e
Copy link
Owner

taiki-e commented Jul 30, 2022

  • --no-report before run is silently ignored and

This is #151, and will be fixed by #197

  • --no-report affects whether a rebuild happens

readme example describes cargo llvm-cov clean as a command to remove artifacts.

@Eugeny
Copy link
Author

Eugeny commented Jul 30, 2022

This is #151, and will be fixed by #197

👍

readme example describes cargo llvm-cov clean as a command to remove artifacts.

Sorry if I wasn't clear - I've already figured out how to do / not do a rebuild, but it's still unexpected for a new user that adding --no-report will also change the build behaviour (and not just whether a report is generated)

@taiki-e
Copy link
Owner

taiki-e commented Jul 30, 2022

I've already figured out how to do / not do a rebuild, but it's still unexpected for a new user that adding --no-report will also change the build behaviour (and not just whether a report is generated)

Indeed. Adding a document to mention it seems like a good idea.

@fenollp
Copy link

fenollp commented Sep 6, 2022

I see that the workspace's bin crates are recompiled everytime as well. I can reproduce with the provided repro repo.
My usage:

while :; do cargo llvm-cov --all-targets --all-features --locked --frozen; done

# Note: plain cargo test call does not recompile things:
while :; do cargo test --all-targets --all-features --locked --frozen; done

Please advise.

@Eugeny
Copy link
Author

Eugeny commented Sep 6, 2022

@fenollp adding --no-report should help. In my cases, I've ended up running it once and then running the compiled binary multiple times directly during my integration tests.

@bors bors bot closed this as completed in aa3556a Sep 6, 2022
@taiki-e
Copy link
Owner

taiki-e commented Sep 6, 2022

Added --no-clean flag as a workaround for this. See #214 for more.

@taiki-e taiki-e mentioned this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: A question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants