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

Concurrent compilation when watching #414

Open
dapetcu21 opened this issue Mar 10, 2014 · 10 comments
Open

Concurrent compilation when watching #414

dapetcu21 opened this issue Mar 10, 2014 · 10 comments
Labels

Comments

@dapetcu21
Copy link
Contributor

When watching, if files change very fast, roots watch will start compiling twice, concurrently. Nothing bad usually happens, but I can see how this would lead to a race condition (plus, it doesn't look nice and it's additional strain to the CPU).

A solution would be to queue up a second compile if a file changed while compilation was already happening.

➜  argo-tabs git:(master) ✗ roots3 watch
compiling... done!
compiling... compiling... compiling... compiling... done!
done!
done!
done!
compiling... compiling... done!
done!
compiling... compiling... done!
done!
@jescalan
Copy link
Owner

Good call, will make this happen.

@samccone
Copy link
Collaborator

wow such async

@jescalan
Copy link
Owner

So just thinking about this, wouldn't it even be better to just stop the first compile and move to the second? Who cares if public is a little out of whack, it's going to be recompiled in a moment anyway. This would have to not be the case if we were to re-implement selective compilation (try to compile one file if possible rather than the whole project), but for now we are recompiling all...

@samccone
Copy link
Collaborator

I am running into this exact issue still on v3... I think this is prob blocking right?

@samccone samccone added the bug label Sep 22, 2014
@jescalan
Copy link
Owner

This is something we want to fix before release. It just means a bit of queueing in watch mode. If anyone wants to jump in and help with implementation it would be awesome, I have my hands full at the moment but will get to this eventually if not.

@samccone
Copy link
Collaborator

was there ever any thoughts on the root of this problem?

@jescalan
Copy link
Owner

Yeah, the root is that if you compile twice, it runs twice. There is no mechanism in place to queue compiles right now. It's not really that it's a bug with a solution, it's more of a feature that hasn't been implemented yet.

@jescalan jescalan changed the title v3: Concurrent compilation when watching Concurrent compilation when watching Dec 17, 2014
@samccone
Copy link
Collaborator

samccone commented Jan 9, 2015

sometimes this can end poorly
screen shot 2015-01-09 at 11 04 23 am

@jescalan
Copy link
Owner

jescalan commented Jan 9, 2015

Yup, that's why we have an open issue for it...

@samccone
Copy link
Collaborator

samccone commented Jan 9, 2015

yep :) ha just leaving another note for me

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

No branches or pull requests

3 participants