Re:Why I Prefer Makefiles over Package.json Scripts
by dongping on Monday March 14, 2022 @10:13AM
(#30672669)
Bazel would be a better solution in terms of reproducibility and user-friendliness, though.
[ Parent
| on HN ]
Re:Why I Prefer Makefiles over Package.json Scripts
by nuccy on Monday March 14, 2022 @10:18AM
(#30672733)
I agree, but make is usually more abundant on much more systems (which is useful when there is no root privileges available). Also people are used to run make when they encounter a Makefile. I personally use Makefiles even to create Docker images, I find it simpler to run make images or make run, than remembering (or putting in a script and remember what parameters to use, as pointed in the comment above scripts are too free-style) how to do it manually.
Though I also agree that Makefile is not a silver bullet and some more complex/niche methods may be required in particular cases.
Re:Why I Prefer Makefiles over Package.json Scripts
by physicsguy on Monday March 14, 2022 @11:13AM
(#30673380)
It's just a nightmare to manage unless you're a Google-sized company
Re:Why I Prefer Makefiles over Package.json Scripts
by klodolph on Monday March 14, 2022 @12:05PM
(#30674106)
I've been working with Bazel by myself. My experience is that it is not a nightmare... it's just the documentation is missing some pretty crucial "how-to" guides, and there are a couple features that changed a lot prior to 1.0 (so using them is a bit difficult).
Some stuff that is very easy with makefiles is a bit harder with Bazel, so I can't give it an unqualified recommendation. The payoff is that some things that are very, very hard with makefiles are much easier with Bazel (using multiple languages, cross-compiling, downloading dependencies automatically, distributed builds, etc).
Re:Why I Prefer Makefiles over Package.json Scripts
by physicsguy on Monday March 14, 2022 @01:03PM
(#30674959)
My experience is mostly through consuming packages that other people have written, and the downloading existing packages is a big part of why it's problematic. If I already have PrettyCommonStandardLibraryX, I don't really want Bazel to download another copy of it for me just to incorporate your project. Other build systems are simple enough to change, or support this straightforwardly. Doing it with Bazel is quite painful IMO.