4 ms·
I don't understand why people like make so much. Interacting with CLI tools using only env vars as arguments is cartoonishly bad dev experience.
by x3n0ph3n3 1y ago
I don't understand why people like make so much. Interacting with CLI tools using only env vars as arguments is cartoonishly bad dev experience.
- deleted 1y ago[deleted]
- zabzonk 1y agoYou can pass arguments via the command line (it is, after all, a CLI tool): https://stackoverflow.com/questions/2826029/passing-additional-variables-from-command-line-to-make https://stackoverflow.com/questions/2826029/passing-addition...
- lmz 1y agoI mean there's really not much difference between "VAR=val make x" and "make x VAR=val" now is there?
- marginalia_nu 1y agoSyntactically? No. Semantically? Yes.
- lmz 1y agoI'm guessing the syntax was the part the poster was complaining about when they complained about the "dev experience".
- marginalia_nu 1y agoDunno, there are other aspects of environment variables that deteriorate the dev experience. They're very conducive to spooky action at a distance, since they're silently being passed along from parent-process to child-process (except when they aren't). They can cause a lot of annoying bugs, and sometimes it's hard to track down where they are coming from (especially when dealing with stuff running in containers).
- 77pt77 1y ago> except when they aren't Like sudo for example. So many problems related to that.
- hiAndrewQuinn 1y agoI often prefer to work in in extremis environments where there is no internet access, and hence, no easy way to get ahold of make; it's given me a bad habit of just waiting a build.bash script to do what make does most of the time. I haven't really found myself missing it that much.
- M0r13n 1y agoI am confused, because this means that you won't be able to install anything. No compiler, no 3rd party libraries and no text editor that isn't preinstalled
- 0points 1y agoIf you can install bash on your airgapped dev box, why wouldn't you install make on it? Make is part of the core dev environment on just about every disto under the sun.
- 77pt77 1y agomost minimal setups nowadays have bash, make and even perl.
- lelanthran 1y agoI've worked on payment terminals running linus that had a shell like busybox but no make. Of course it's a damn payment terminal, no one is ever going to actually build the app on the terminal so it has no compiler either. I'm wondering what sort of dev machine GP has that is used to build software but doesn't have make...
- deleted 1y ago[deleted]
- georgyo 1y agoI'm not so sure most people would agree with you. Though I think plenty would. I dare say that developers like environment variables more than before. Consider that Docker images, and hence Helm charts, are entirely controlled via environment variables. These very popular dev tools suffer from the same problem of having near-zero easy discoverability of what those environment variables might be. Yet they are very popular. But I don't think Make usually uses all that many environment variables. You're usually specifying build targets as the command line arguments. Automake and autogen usually generate these makefiles with everything hard-coded. Also, it makes it very easy to get started with, and it is universally available. Makes it very easy to like.
- globular-toast 1y agoIt's 80% of what you want and it's installed everywhere. You could go for something closer to exactly what you want, but now you've got an extra set up step for devs and something else for people to learn if they want to change it. I would say if you're looking for cli args then you shouldn't be using any wrapper like make at all. Just call the underlying tool directly. Make is for doing big high level things in the standard way, nowadays quite often in CI pipelines.
- zelphirkalt 1y agoYep, that's how I used it on the job before. "make test" would run tests locally and in CI pipeline, keeping the CI file refreshingly short at that point.
- zelphirkalt 1y agoMake allows you to specify dependencies for you targets, which are also targets. As such you do not need to rely on brittle string concatenation approaches. It is a tool build for this. I personally like going to a project folder and run "make run", no matter what language or setup I have, to run the project. It enables me to unify access to projects. I also take great care to make these runs reproducible, using lock files and other things of the ecosystems I am using, whenever possible. I work on another machine? git clone, make run. Or perhaps git clone, make init, make run.
- danlitt 1y agoMake is in POSIX, so it's generally available. Same reason people write shell scripts (even if the scripts are not generally POSIX-only).
- bshacklett 1y agoUnless your company forces you to use Windows, which is still much more common than many would like to admit. And yes, WSL exists, but in my experience, if a company is unwilling to allow macOS, there’s a good chance they either don’t allow enabling HyperV, or the security software they use is such garbage that it results in a HyperV enabled system being effectively unusable.
- pjmlp 1y agoWindows 11 requires Hyper-V turned on, virtualization based security is one of the reasons of the forced hardware upgrades.
- bshacklett 1y agoAny chance you could provide links to documentation around that? I haven't been able to find anything definitive about exactly what's required and what's enabled by default.
- lelanthran 1y agoUnless the company also forcefully prevents installation of git bash, you'll have make as well. I know, I know, what developer on windows uses git via the official git windows client, right? /s
- bshacklett 1y agoHaving make doesn't help much if you don't have the commands that it's calling.
- PhilipRoman 1y agoYou don't have to write Make invocations by hand... It's just a tool that can be called from any editor or IDE (or by automatic file watchers). Environment variables aren't really relevant to Make either, unless you really want to misuse it as a command runner.
- cerved 1y agoI like it because it's language and tooling agnostic, declarative, fast and ubiquitous. Where it's less great is complicated recipes and debugging
- aboardRat4 1y agoBecause make is a prolog in disguise.
- gjvc 1y agoyou don't do it naked, you write and use wrapper scripts to make it ergonomic
- motorest 1y ago> Interacting with CLI tools using only env vars as arguments is cartoonishly bad dev experience. Make excels at what it's design to do: specify a configurable DAG of tasks that generate artifacts, execute them, and automatically determine which subgraph requires updates and which can be skipped by reusing their artifacts. I wonder: which tool do you believe does this better than Make?
- system33- 1y agoTup. https://gittup.org/tup/ https://gittup.org/tup/ https://gittup.org/tup/make_vs_tup.html https://gittup.org/tup/make_vs_tup.html But the Internet’s make mind-share means you still have to know make. Edit: and make lets you use make to essentially run scripts/utils. People love to abuse make for that. Can’t do that with tup.
- aDyslecticCrow 1y agoAbuse? Runnig linters, code analysers, configuration tools, template engines, spellcheckers, pulling dependencies, building dependencies with different build systems. Sufficiently complex project need to invole alot of wierd extra scripts, and if a build system cannot fulfil it... the n it needs to be wrapped in a complex bash script anyway.
- motorest 1y ago> Tup. I don't think Tup managed to present any case. Glancing at the page, the only conceivable synthetic scenarios where they can present Tup in a positive light is built times of > 10k files, and only in a synthetic scenario involving recompiling partially built projects. And what's the upside of those synthetic scenarios? Shaving w couple of seconds in rebuilds? That's hardly a compelling scenario.
- deleted 1y ago[deleted]
- kiitos 1y ago> Tup `tup` relies on a stateful database, which makes it incomparable to `make`.