caleb / broccoli-fast-browserify

A caching, flexible Browserify Broccoli filter
https://github.com/caleb/broccoli-fast-browserify
BSD 3-Clause "New" or "Revised" License
14 stars 7 forks source link

Sometimes no recompiles #17

Closed kraftwer1 closed 8 years ago

kraftwer1 commented 9 years ago

Sometimes it happens to me that when I save, the bundle doesn't get recompiled (especially when I work on different files within the same bundle).

My setup chain is as follows:

  1. broccoli-funnel
  2. broccoli-coffee (correctly recompiled after save)
  3. broccoli-merge-trees (correctly recompiled after save)
  4. broccoli-babel (correctly recompiled after save)
  5. broccoli-fast-browserify (no recompile, still contains the old code)

But I get no error messages, neither in Node nor in browser. After a recompile has failed, future recompiles don't work anymore. I have to restart Broccoli.

I'm using the newest versions of all packages, including Node itself.

Any idea what that might be? Is this a common issue or do I have to provide more details?

kraftwer1 commented 9 years ago

I've set up a minimal example with steps to reproduce: https://github.com/kraftwer1/broccoli-fast-browserify-bug

kraftwer1 commented 9 years ago

After some debugging, I've found the line where it happens in the code: https://github.com/caleb/broccoli-fast-browserify/blob/1bd13f8c9f222a1df22050353d8699c7c22666e0/index.js#L112

Why is that if needed? Probably some caching mechanism? Commenting it out leads to the expected behaviour.

metcalf commented 8 years ago

I'm suffering from a similar problem using broccoli-funnel => broccoli-babel => broccoli-fast-browserify.

maherbeg commented 8 years ago

Also hitting into this with the same chain as @metcalf

maherbeg commented 8 years ago

It looks like the https://github.com/caleb/broccoli-fast-browserify/blob/master/index.js#L240 is not getting called sometimes.

maherbeg commented 8 years ago

Tracked down the bug. Has to do with entry point file invalidation. Thanks to @kraftwer1's amazing reduced example.