4 ms·
I've started using justfiles (https://just.systems/man/en/ https://just.systems/man/en/) for everything I would've previously used Makefiles for that aren't dir
by kstrauser 4y ago
I've started using justfiles (https://just.systems/man/en/ https://just.systems/man/en/) for everything I would've previously used Makefiles for that aren't directly related to compiling code.
Make is a wonderful way to provide a standard set of entry points into working with repos. For instance, if you can standardize on `make setup`, `make test`, `make docker`, etc. on all of your organization's code, it's very easy for a new develop on a project to start contributing quickly. You could do that with shell scripts, but then you have to re-implement all the command line parsing that make gives you for free. And with justfiles, you can have something that looks and feels like make, but with a more pleasant syntax for non-compiling jobs.
IMO, Just is to make as zsh/fish are to bash. It's not ubiquitously available, and it's not 100% backward compatible, but if you can convince your coworkers to adopt it as your standard, it makes life that much easier for everyone.
- roqi 4y ago> And with justfiles, you can have something that looks and feels like make, but with a more pleasant syntax for non-compiling jobs. Make is a part of UNIX, which ensures it is extremely stable and is available on all UNIX systems. You don't get that from justfiles. You get syntactic sugar, but all the best parts of Make are thrown out of the window.
- kstrauser 4y agoOK, that's just not true. For starters, which make? GNU and BSD are common variants, and aren't 100% compatible. The overlap is large and useful, but does mean that you have to be aware of it if you're using multiple systems. For my uses, make offers nothing of value over just. I don't need any of the clever build dependency resolution stuff when I'm working in Python, and cargo handles everything better when I'm using Rust. Which isn't to say that make isn't enormously powerful and useful for other people, only that its extra power causes more work than reward for the ways I personally want to use it. For me, just is everything about make that I actually use, minus all the complicating features that get in my way.
- roqi 4y ago> OK, that's just not true. If you really feel that way then you will have to ask the OpenGroup people to fix the UNIX Shell and Utilities part, because they seem to have included a specification of make. https://pubs.opengroup.org/onlinepubs/009695299/utilities/make.html https://pubs.opengroup.org/onlinepubs/009695299/utilities/ma... > For starters, which make? The interface specified in the standard. > GNU and BSD are common variants, and aren't 100% compatible. Irrelevant. UNIX specifies an interface. It matters nothing if some implementation added their extensions. > For my uses, make offers nothing of value (...) That's perfectly fine. Just install just in your machines and work on your personal projects as you see fit. If on the other hand you intend to distribute something you work on, using make ensures that those using specific target platforms don't need to install extra software because it already ships preinstalled.
- portiaKane 4y ago[dead]
- fbdab103 4y ago>You get syntactic sugar, but all the best parts of Make are thrown out of the window. What does make have that just is missing? I have only dipped my toe into just, but it seems like a more-or-less superset of functionality. Plus, all sorts of niceties: built-in functions (path manipulation!), ability to declare scripting languages, self-documenting through `--list`, etc. Quite a lot of natural feature evolution if make was not forever frozen in time by the POSIX standard.
- roqi 4y ago> What does make have that just is missing? Make is a part of UNIX, so it's ubiquitous, stable, and time-proof.
- nprateem 4y agoIf the best thing going for make is its ubiquity I'd rather have a tool that's better designed (for non- compiling jobs).
- silverwind 4y agoJust does not support dependency tracking. That eliminates a huge chunk of make's usefulness right there.
- kstrauser 4y agoThat's a feature if you're not using a language that needs it. I've never, not once, ever wanted or needed it for working with Python code, for example.
- deleted 4y ago[deleted]
- safety1st 4y ago> For instance, if you can standardize on `make setup`, `make test`, `make docker`, etc. on all of your organization's code, it's very easy for a new develop on a project to start contributing quickly. This is the real magic trick. In fact you can even go one step further and standardize on just one command: `make help`. Then you walk over to your QA lead and say "Clone the repo, type `make help` and if anything about setup, deployment etc. isn't clear or doesn't work, log a bug." Now your infrastructure is subject to your regular software development lifecycle. You have achieved "Infrastructure as code" with a tool that was authored in 1976. Unreasonably effective.