For Mix.install you can optionally specify the cache directory. For regular projects they are in the deps folder.
> The location of the cache directory can be controlled using the MIX_INSTALL_DIR environment variable.
https://hexdocs.pm/mix/1.14/Mix.html#install/2
> download from where?
Or you can specify a git commit, or a path if you want to alter it locally.
> No way to keep track of what to change when mix create outputs something different next year.
`mix.lock` keeps track of your resolved dependencies and should be checked in along with your code. Mix/Hex can also be provided the exact `==` versions rather than the `~>` or other Version specifiers
will you have one dep dir on each place you run the script at?
If anything I sometimes find myself annoyed that Ecto is not there by default, because it's part of almost all my projects, and often even a one-file script might benefit from bits of it.
That's how any modern package manager works (I'm thinking cargo as well). I'm not sure why not doing that would be preferable.
most languages dont havea built in package manager.
I've run into this with the Phoenix generators a bit because you need to make changes to your project if you want to update to newer versions of the Phoenix libraries, but they produce documentation about what you need to change.
it's like using Maven or npm all over again. but even worse because it generates a lot of code.
it creates disposable projects by design. No way to keep track of what to change when mix create outputs something different next year.
and now things like https://github.com/wojtekmach/mix_install_examples/blob/main... where is ecto even installed? download from where? so annoying this trend.