Skip to content

Conversation

@jbunton-atlassian
Copy link
Contributor

This changes the meaning of the --wait option.

I find this alternate behaviour much more useful. I don't ever want to have two copies of my tests running at the same time. I suspect that for most/all people using this tool with --wait X this will be a compatible replacement.

If you're interested but want to keep backwards compatibility I'd be happy to write the extra code behind a new option flag.

Thanks for looking :)

@levithomason
Copy link
Collaborator

This seems like a useful feature, but, I don't think we should make it a breaking change to the current --wait flag. I'd expect this to be a new option.

In the end, the design is up to @mikeal on this one.

@jbunton-atlassian
Copy link
Contributor Author

Sure, I'd be happy to rework it as an alternative option. I just thought I'd put it up here first in its simplest form to see if you were interested :)

@jbunton-atlassian
Copy link
Contributor Author

Hi @mikeal, would you be interested in this feature? Either as-is or as a separate option?

I'm also curious what was the intention behind the existing --wait feature and how people use it right now.

Thanks :)

@hbt
Copy link

hbt commented Apr 22, 2017

@jbunton-atlassian does this work with child processes?
execshell uses sh -c which can result in not waiting for orphans

Example:

cli.js ... script.sh

script.sh


ls
tree &
exit

Would this code wait for tree to finish before executing it again?

I implemented something similar by checking for child processes in #128

@jbunton-atlassian
Copy link
Contributor Author

@hbt, no, it only waits for the parent process in that case. In your example you should be able to change exit to wait to have the same effect.

I had a quick look at your code and noticed that it discards modification events while waiting rather than queueing them. I use watch to run tests, so if I make changes while the tests are running I want them to rerun immediately. Did you consider this use case?

@jbunton-atlassian
Copy link
Contributor Author

Hi @mikeal, any thoughts on this feature?

@jbunton-atlassian jbunton-atlassian force-pushed the wait_for_command_instead_of_seconds branch from 9386090 to 5de0fc9 Compare July 26, 2017 01:21
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

Successfully merging this pull request may close these issues.

3 participants