rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

[Bug]: npm lifecycle hooks re-evaluated without any change to inputs

Open jbedard opened this issue 1 year ago • 3 comments

There have been reports of lifecycle hooks re-running unnecessarily, when no inputs change.

jbedard avatar Oct 22 '24 18:10 jbedard

Our use case: we depend on nodegit which has a very expensive (120s+) lifecycle hook:

[85,797 / 85,799] Running lifecycle hooks on npm package [email protected]_t2g22a3cflk65wz3kqpekiolbu [for tool]; 45s local

We literally never change the version of nodegit we use so I'd expect that this lifecycle hook output is cached on my laptop forever (or at least until I clear it manually) but that is not the case. It seems that some set of conditions cause this thing to rebuild sometimes ... I have not figured out what they are.

samsternatretool avatar Oct 22 '24 20:10 samsternatretool

Possibly related? If seen on MacOS:

https://github.com/bazel-contrib/bazel-lib/issues/887

matthewjh avatar Oct 24 '24 15:10 matthewjh

@matthewjh that's a really interesting theory! And yes I am on macOS

samsternatretool avatar Oct 24 '24 16:10 samsternatretool