2 ms·
People like Just when they're the one who is writing the recipes, because those recipes implicitly depend on whatever they have installed at the time of writing
by __MatrixMan__ 2y ago
People like Just when they're the one who is writing the recipes, because those recipes implicitly depend on whatever they have installed at the time of writing so everything is easy, but then other people come to the project and it has a culture of "IDK I just use the Just recipe," except that recipe doesn't work unless you've been around since it was written and have all of the right versions of things. For instance I've got all these errors like:
> This application uses version go1.20 of the source-processing packages but runs version go1.23 of 'go list'. It may fail to process source files that rely on newer language features. If so, rebuild the application using a newer version of Go.
They don't seem to be hurting anything but I'm not really sure how to reason about them since somebody packaged the commands together but didn't specify anything about the environment. The Justfile entry tells me that it's running some script in $FOO_DOWNLOAD_DIR but I've got some sleuthing to do to figure out where that dir actually is and how its contents were populated and what it has to do with `go list`.
This is of course bad practice, but Just is the rug under which it is hidden and made to look like good practice. It's good that Just doesn't claim to manage dependencies, since it doesn't, but this action could instead be a go program in which case go would be handling those dependencies for me.
- pdimitar 2y agoI don't disagree. Your example is a good demonstration why Nix -- or a much more thorough Justfile -- would be needed. In my case I also supply the `.tool-versions` file so that only mandates the other dev to have Just and asdf / mise (for installing exactly the right versions of tools). I also tried having full Dockerized development environment but that proved to be too much of a hassle. But yep, in your scenario it seems like the other guys did sloppy work. Sadly 99% of everything can be misused by people who don't practice their craft well. (EDIT: Golang programs should really be made to work with the latest version, all being said and done. Another example of sloppy work, if you don't mind me saying.)