5 ms·
> For instance, it has a lot of the "was there an error? eh, just keep going" philosophy from early days. I don't know what you're talking about. make stops wh
by tannhaeuser 4y ago
> For instance, it has a lot of the "was there an error? eh, just keep going" philosophy from early days.
I don't know what you're talking about. make stops when a command it has launched terminates with a non-zero exit code, and if anything, "just keep going" is rather a thing in today's needlessly-async JavaScript tool chains.
- hedora 4y agoOnce you step off the beaten path, you find that errors from things like: false | true Get silently swallowed by bash (this is configurable, but the default ignores such errors). Also, the point about not noticing that a rule didn't create its target is a good one. (That behavior should be configurable; I don't think it is.) Anyway, with -j, make is as async as pretty much anything else out there.
- imoverclocked 4y agoSome targets are virtual and don't create a file named as the target. Sometimes a target may or may not create a file based on internal logic. make itself is consistent in that it looks for errors from return status of the commands it spawns.
- Izkata 4y ago> false | true That statement succeeds. Where's the error? To be more precise... "make" isn't "bash". There's no problem with "make" here and it has no way to see inside bash's internals. It's a bit like asking "make" to understand python, javascript, and java code and runtimes.
- sgtnoodle 4y agoI think the desire would be for that statement to fail. The pipe looks like a logical or, but it's actually for chaining IO. Always a good idea to turn on the pipefail option in your bash scripts.
- Izkata 4y agoYeah, that's what I mean: This is a bash thing, not a make thing - but they're ascribing it to make instead of bash.
- meindnoch 4y agoset -euo pipefail
- bombolo 4y agoYou can set bash to fail on that…
- jerf 4y agoWell, I'd be talking about things like "I'd like it to be an error if a make rule claims to make a certain dependency and it fails to do so.", like I said in the next sentence. While we're at it, undefined variables should be errors, not turned into empty strings, and like I said, were I working with it routinely I'm sure I could come up with more. There's a lot more to make than just its shell invocations. Furthermore, embedding shell's default error handling behavior into make isn't exactly a comforting thing. It's way quirkier than a lot of people understand, and unfortunately it all comes to the surface when people start using make. "It stops at a non-zero exit code!" is, unfortunately, far, far from the simple thing it sounds like. And encountering the "errors? pshaw, whatever" attitude in multiple languages is precisely why I know it's such a bad idea. Were it just Perl or something, I wouldn't be able to tell if it's a bad idea or if Perl is just a bad implementation, but after the decades I've been using these languages, I've come to the conclusion it's just a bad idea everywhere I encounter it.
- Annatar 4y ago[dead]