observing / square

The last build system you would ever want to use
MIT License
56 stars 9 forks source link

--watch on projects with shared dependencies triggers only first square process #55

Open janmartenjongerius opened 11 years ago

janmartenjongerius commented 11 years ago

When we combine a make entry and let square run multiple processes on different bundles, all but the first bundle of the bundles that share dependencies won't get triggered. E.g.

Application a.js has ../common/dep.js in a/bundle.json Application b.js has ../common/dep.js in b/bundle.json

In the Makefile we set up:

ab.js: a.js b.js

a.js:
  square --bundle a --plugin crush --extension js --watch

b.js:
  square --bundle b --plugin crush --extension js --watch

Then we run: $ make -j2 ab.js

We see two square processes spawn, compile and watch.

Now, we change something in dep.js and save that file. What should happen is that we see two square processes get triggered, but instead we only see the square process for a.js.

Swaagie commented 11 years ago

this is related to the amount of jobs your are letting make spawn -j2, it should be different child processes. Since square does endless loops to wait for the next write I'm wondering if it is delegated properly to all processes, or somehow one process gets in the way of the other before it is able to trigger.