gob icon indicating copy to clipboard operation
gob copied to clipboard

Smarter dependency watching

Open b1lly opened this issue 10 years ago • 5 comments

Because of OSX fs watcher limits, instead of dropping a watcher in every single package, it would be nice to find the lowest common ancestor for a bundle of dependencies and watch recursively from that root.

b1lly avatar Apr 07 '14 00:04 b1lly

Hiyo!

https://github.com/b1lly/gob/tree/master/dependencies

b1lly avatar Apr 24 '14 06:04 b1lly

Did we not want to add a weighted aspect - i.e. dependencies used more heavily throughout a package are more important to watch?

ttacon avatar Apr 26 '14 14:04 ttacon

That's definitely a good question, I'm totally open to doing this. I assume to do this, we'd need to get the imports for a package at the file level in order to figure out how many occurrences throughout the built package. This is what you're referring too right?

Currently it recognizes dependencies used cross-package as duplicates and weights them heavier during prioritization.

b1lly avatar Apr 26 '14 20:04 b1lly

I wrote a little tool that does this during gophercon - I'll push it to develop when I get a chance.

ttacon avatar Apr 28 '14 17:04 ttacon

I pushed this tool now, it exposes a useful API (I think).

https://godoc.org/github.com/ttacon/heavydep

ttacon avatar May 25 '14 18:05 ttacon