3 ms·
What is the reason for using "just" here? I understand people have their tooling preferences, but this looks like something that build.rs or a plain makefile c
by daghamm 2y ago
What is the reason for using "just" here?
I understand people have their tooling preferences, but this looks like something that build.rs or a plain makefile could have handled?
- mijoharas 2y agoI was also wondering if anyone could chime in on advantages of using just. I'm familiar with makefiles, is there a particular advantage to using just over makefiles or is it personal preference? (which is a totally valid answer! I'm just wondering if I'm missing something)
- aerzen 2y agoI think that the appeal of just is that it is simpler than make. It is not checking timestamps of files, but executes a DAG of tasks unconditionally.
- mijoharas 2y agoMy first thought was that that was dropping one of the main features of make. On reflection though, the timestamp dependant part isn't really something used much nowadays apart from compiling C. It'd be cool if it was an opt-in feature for just files so that it could actually function as a replacement for make in all cases. I went looking in the docs and found this[0] which I'd missed last time I looked into justfiles. [0] https://github.com/casey/just?tab=readme-ov-file#what-are-the-idiosyncrasies-of-make-that-just-avoids https://github.com/casey/just?tab=readme-ov-file#what-are-th...
- daghamm 2y agoI don't really buy his justification that ".PHONY: xxx" is hard to remember so we should have a completly new tool instead. Make has its issues, but it also has two big advantages: it's simple and everyone already have it.
- IshKebab 2y agoEveryone already has it... on Linux and Mac. It's pretty rare for it to be available on Windows. That said I kind of agree. I like the idea of `just` but it does seem like they have just created a complicated DSL. I think it is better to just write your infra scripting in a real language. I generally use Deno or Rust itself and a thin wrapper that `cargo run`'s it. Using Rust eliminates a dependency.
- mort96 2y agoAnyone who's halfway serious about software development on Windows surely has make there too, and it's not like non-developers are the target audience for 'just' scripts
- IshKebab 2y ago> Anyone who's halfway serious about software development on Windows surely has make there too Not even remotely. I know it might be hard to imagine if you only program on Linux/Mac but there's a whole world out there that isn't built on janky shell scripts and Makefiles. If you use C# or Java or Visual C++ or Qt on Windows it's pretty unlikely that you'd have Make. It's kind of a pain to install and you don't need it.
- krageon 2y agoLiterally zero of the hundreds of devs I know that do software development on windows have make installed. Why would they? It's not usual in the space at all, that's msbuild
- galdosdi 2y agoI agree, and even more strongly: you don't even need to remember .PHONY as long as your target names don't overlap with actual filenames, which is usually easy. In fact, I didn't even know about .PHONY and have used make for a long time. That's what's great about it, even if you stick to the most basic features make is incredibly easy and straightforward. Dare I say, it "just" works lol. I hate the proliferation of new tools that are the same as a tool that's been around for 20 years and is no different in any significant way except being trendy. Just unnecessary entropy. Our job is to manage and reduce, not maximize entropy.
- daghamm 2y agoWouldn't a shell script work just as well than? I'm not against new better tooling, but I also want to keep my dev machine reasonably clean.
- mharrig1 2y agoI recently switched my (small) company over to using just files within our codebases and it's been going over very well thus far. We're building a set of apps that need to run on Linux, MacOS, and Windows so having a consistent solution for each is better than shell scripting and I personally have never felt great about make and it's weirdness. It also helps that we have a pretty big monorepo so that anyone can bounce from one app to another and `just run` to use any of them, no matter the platform. Either way the justification for me came from COSMIC[0]. [0] https://github.com/pop-os/cosmic-epoch/blob/master/justfile https://github.com/pop-os/cosmic-epoch/blob/master/justfile
- Sean-Der 2y agoJohn did all the work on this. Just is nice as a Windows user. When I started committing everything worked really well already. Editing the just stuff also is really easy. Much nicer to read then scripts I think