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

Use a different target dir by default #1086

Closed
Plebshot opened this issue Sep 4, 2022 · 4 comments
Closed

Use a different target dir by default #1086

Plebshot opened this issue Sep 4, 2022 · 4 comments
Assignees

Comments

@Plebshot
Copy link

Plebshot commented Sep 4, 2022

Having stumbled upon #1076, I feel like using a separate target directory should be the default for tarpaulin. We've also dealt with a lot of confusion why our pipeline is so painfully slow despite caching. It can be really confusing if a simple cargo check suddenly recompiles everything because tarpaulin overwrote the cache with a different build.

This behavior was even more unexpected to me, when it recompiled everything despite the --skip-clean flag. Originally I came her to open a bug report for that, but now understand that sometimes tarpaulin needs to recompile everything due to rustflags.

I think having a separate target dir by default would prevent a lot of this initial confusion, especially for people not knowing much about rustflags etc.

@xd009642
Copy link
Owner

xd009642 commented Sep 5, 2022

So I don't think setting a different target directory by default is desired, looking at some of my projects the target dir is already >3GB from a clean build and the vast majority of tarpaulin users are using it in CI and the cleaning behaviour doesn't actually matter to them (this won't change CI runtime after all).

Also when #549 becomes default and the RFC for limiting rustflags to just the workspace crates drop the situation will dramatically improve anyway so I'd rather wait till then instead of bloating up peoples target directories more by default.

@xd009642 xd009642 closed this as completed Sep 5, 2022
@Plebshot
Copy link
Author

Plebshot commented Sep 5, 2022

That's some valid points. I hope it improves with that RFC in the future then.

In my experience, caching in pipelines is always preferred (unless building release) to avoid having the devs sit for 40min to realize something failed. The current behavior just caused massive confusion for us. I noticed that even locally, in between running tarpaulin, my IDE runs cargo check, therefore rebuilding the entire project everytime.

@xd009642
Copy link
Owner

xd009642 commented Sep 5, 2022

To make it more default, you can add a tarpaulin.toml config file setting a target dir for tarpaulin to use and have it as a project template. That will cause less confusion in new projects with other engineers

@Plebshot
Copy link
Author

Plebshot commented Sep 5, 2022

Yes, we solved it now by adding a target dir manually. Depending on how long #549 will actually take, it would be nice if this behavior with the flags could be pointed out in the docs. Especially with --skip-clean it's irritating if the project recompiles everytime due to running check etc. in between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants