Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR shows how you would replace
make
withjust
.My detailed thoughts on the matter are summarized in this Discourse post, but I'll post here my main conclusions from that post:
just
recipes are easier to run, better documented, and more clearly explained to the user;just
recipes are more robust and can let you require tools and environment variables;just
is easier to write and maintain;make
is ubiquitous, butjust
has a snap (and you can technically runjustfiles
withuv
instead ofjust
).The
Makefile
here is extremely simple (recipes with no parameters, or ALL the positional arguments), so some benefits are not visible here.How do I run things?
just
will show you the available commands:If you want to pass parameters to a recipe, simply specify them after:
What if I don't want an extra dependency?
Read this section of my Discourse post.
I still recommend snap-installing
just
, but if you really don't want an extra dependency (even though we just hadtox
around, we're essentially swapping it):#!/usr/bin/env -S uvx --from=rust-just just --justfile
chmod +x justfile
./justfile
withoutjust
on your system