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

Don't recheck files for 'build' if they have already passed 'check' #2248

Closed
White-Oak opened this issue Dec 25, 2015 · 4 comments
Closed

Don't recheck files for 'build' if they have already passed 'check' #2248

White-Oak opened this issue Dec 25, 2015 · 4 comments

Comments

@White-Oak
Copy link

It would be really great to have a simmilar behavior to how cargo build works:
If cargo check has passed and no files have been changed since then — don't recheck them and compile directly.

I'm not sure if it's possible at all and at what cost it would be, since checking code is probably an intermidiate action. Also, cargo-check is an external subcommand.

But what brought this to my mind: if it was possible, it could really speed up compilation times when working in IDEs, since cargo check is run very often to lint files. And after a satisfying check to have an ability to build project quick would be really great.

@xamgore
Copy link

xamgore commented Dec 26, 2015

👍

@dashed
Copy link

dashed commented Dec 26, 2015

👍

Are there plans for cargo check to be built into cargo?

I'm using cargo check in combination with cargo watch: https://github.com/passcod/cargo-watch
which is useful when I'm subconsciously saving rust files, and then do a compilation step (i.e. cargo build) when output of cargo check looks fine.

@aNNiMON
Copy link

aNNiMON commented Dec 26, 2015

👍

@jonas-schievink
Copy link
Contributor

If cargo check has passed and no files have been changed since then — don't recheck them and compile directly.

Unfortunately, type checking (the slowest checking pass in most cases AFAIK) produces information needed by later passes in the compiler (mainly, translation).

Sounds like what you want is incremental compilation, which is currently being worked on. See rust-lang/rfcs#1298.

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

No branches or pull requests

5 participants