Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good idea, but it misses some clever tricks. What happens when a dependency does change, but not in a way that actually matters? Buck has a nice feature where Java libraries are only fully recompiled when the API of their dependencies change, since everything is dynamically linked. https://www.youtube.com/watch?v=uvNI_E0ZgZU


tup can be made to ignore unimportant changes. I had to look up the syntax, hopefully I got it correct.

I have foo.c, bar.c and a rule like:

  : foreach foo.c bar.c |> ^o^ gcc -c %f -o %o |> %B.o {objs}
  : {objs} |> gcc %f -o %o |> baz
The ^o^ part tells it to not trigger the next rules if there's been no change to the output. So if you just change your source files to use an updated license, reformatted it for clarity, etc., then nothing else will happen.

I used this with some of my literate code projects where I had tup running org-tangle for me (via an emacs script). If I'd only updated the documentation, and the code hadn't changed, nothing else would build. If I'd only changed unimportant parts of the code that generated the same object files, no new binary or library would be built.


> What happens when a dependency does change, but not in a way that actually matters

I believe that tup does have some features in that direction, but I may be mistaken.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: