This feels like something that either isn’t needed or should be the default
behaviour, not an opt-in.

Where I feel it may not be needed is because if there is a mismatch while I
am developing, it is a *deliberate* change that I have made and want the
implicit update behaviour. It also only happens if there’s a version
mismatch (e.g., the mix.exs file contains *~> 3.2* but the mix.lock file is
*3.1.2*). Otherwise, mix.lock is frozen. That is, if mix.exs contains *~>
3.2* and the mix.lock is *3.2.2* but *3.5.2* is available, there will not
be an update applied.

Where I feel it may be better as the default behaviour is that I think that mix
deps.get --update-changed might be better as you explicitly tell the
tooling that you expect an update.

I’m not happy in the Node ecosystem that you have to use npm ci or yarn
install --frozen-lockfile in order to not have volatile lockfiles. The
behaviour in the Node ecosystem is that a transitive dependency *may* update
with a normal npm install or yarn install.

-a


On Wed, Mar 30, 2022 at 10:31 AM Luis Guilherme <
[email protected]> wrote:

> If dependencies in the mix.lock do not match those in mix.exs, *mix
> deps.get --strict* will exit with an error, instead of updating the
> mix.lock file.
>
> This is inspired by npm ci
> <https://stackoverflow.com/questions/52499617/what-is-the-difference-between-npm-install-and-npm-ci>
>  and
> aims to solve a rather common problem of people updating mix.exs but
> forgetting to update the mix.lock file.
>  (there are non-obvious situations if you have path dependencies, where
> updating a dependency version will cascade to every other mix project using
> it)
>
> npm ci is used on the official github action
> <https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml>
> for node.js and I think it would be nice to use mix deps.get --strict on
> the elixir one as well
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/8918d9ca-2fcb-4abd-b28e-f7bf2a00ead1n%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/8918d9ca-2fcb-4abd-b28e-f7bf2a00ead1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Austin Ziegler • [email protected][email protected]
http://www.halostatue.ca/http://twitter.com/halostatue

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAJ4ekQugHWnXrhtjPkipgbvPy%3DWzWWpzKLi7WCrJT3d_4AuJ3A%40mail.gmail.com.

Reply via email to