Create an internal CLI using Just
blog.chay.dev
Create an internal CLI using Just
1–10 of 20 posts
Re: Create an internal CLI using Just
#2Re: Create an internal CLI using Just
#3What is the benefit of using shiny new `just` instead of an industry-standard `make`?
- two ways of producing the same file
- a command with no side effects
- not having to draw up a state machine
just can enumerate its own commands, which is minor but helpful
just can execute in multiple directories, and can descend directories
just treats spaces and tabs identically for indention, rather than space-indented for shell scripts and tab-indented for make commands
Re: Create an internal CLI using Just
#4What is the benefit of using shiny new `just` instead of an industry-standard `make`?
‘just’ is command-oriented, not target-oriented; this allows you to have: - two ways of producing the same file - a command with no side effects - not having to draw up a state machine just can enumerate its own commands, which is minor but helpful just can execute in multiple directories, and can descend directories just treats spaces and tabs identically for indention, rather than space-indented for shell scripts a…
Make targets can be whatever you want, and don't have to produce files.
Make -n TARGET will list everything that Make thinks it needs to do to achieve TARGET, including anything that has to happen for any expressed dependencies (which can be tasks, and don't have to produce files).
Make recipes are arbitrary shell scripts that can do whatever you want, including changing directory. Make can also include other Makefiles, or call other Makefiles.
At its core, Make is a way to express "snippets of shell scripts, with a dependency graph between them". It can track files as dependency input and output -if you want-, but Make does not care if you don't. Call your targets whatever, and don't have them produce files. Boom, command runner. Make also has a powerful design, with a lot that you can do at parse-time.
And as it turns out, most tasks -do- have some amount of file dependencies. Maybe they need to consume a key file. Maybe they download a tarball. Maybe they produce a logfile that another task uploads. Being able to express as much (or as little) of that dependency graph as I want is a feature, not a bug.
Re: Create an internal CLI using Just
#5What is the benefit of using shiny new `just` instead of an industry-standard `make`?
Re: Create an internal CLI using Just
#6Earlier quoted context omitted.
‘just’ is command-oriented, not target-oriented; this allows you to have: - two ways of producing the same file - a command with no side effects - not having to draw up a state machine just can enumerate its own commands, which is minor but helpful just can execute in multiple directories, and can descend directories just treats spaces and tabs identically for indention, rather than space-indented for shell scripts a…
Make can do all of those, easily, even eliminating TABs if you really care that much (I don't, my IDE handles them and it's really not a big deal). Have you ever taken the time to learn how to use it? Make targets can be whatever you want, and don't have to produce files. Make -n TARGET will list everything that Make thinks it needs to do to achieve TARGET, including anything that has to happen for any expressed depe…
But it's simply not true that Make does all of that.
I moved from make about 5 years ago, never been happier.
Re: Create an internal CLI using Just
#7Earlier quoted context omitted.
‘just’ is command-oriented, not target-oriented; this allows you to have: - two ways of producing the same file - a command with no side effects - not having to draw up a state machine just can enumerate its own commands, which is minor but helpful just can execute in multiple directories, and can descend directories just treats spaces and tabs identically for indention, rather than space-indented for shell scripts a…
Make can do all of those, easily, even eliminating TABs if you really care that much (I don't, my IDE handles them and it's really not a big deal). Have you ever taken the time to learn how to use it? Make targets can be whatever you want, and don't have to produce files. Make -n TARGET will list everything that Make thinks it needs to do to achieve TARGET, including anything that has to happen for any expressed depe…
But we get it, you don't want to try anything new.
Re: Create an internal CLI using Just
#8You can do all of this with make and make includes.
Re: Create an internal CLI using Just
#9Earlier quoted context omitted.
Make can do all of those, easily, even eliminating TABs if you really care that much (I don't, my IDE handles them and it's really not a big deal). Have you ever taken the time to learn how to use it? Make targets can be whatever you want, and don't have to produce files. Make -n TARGET will list everything that Make thinks it needs to do to achieve TARGET, including anything that has to happen for any expressed depe…
Give just a try, or don't. But it's simply not true that Make does all of that. I moved from make about 5 years ago, never been happier.
Re: Create an internal CLI using Just
#10Earlier quoted context omitted.
Make can do all of those, easily, even eliminating TABs if you really care that much (I don't, my IDE handles them and it's really not a big deal). Have you ever taken the time to learn how to use it? Make targets can be whatever you want, and don't have to produce files. Make -n TARGET will list everything that Make thinks it needs to do to achieve TARGET, including anything that has to happen for any expressed depe…
Make is painful to use unless you're producing C object files. And even then it's painful to use. But we get it, you don't want to try anything new.
Dismissing it as being for olds is short-sighted.