Hi Jon,

I'm aware of the mechanisms of `mix.exs`, my proposal is for facilitating 
situations in which is useful to do a bump of the whole project 
dependencies.

In my work experience it happened often that dependencies are just 
periodically bumped up all together without checking the changelogs, mainly 
because most of them are bumped by a patch version, but that's not always 
the case.

Having a flag that guarantees that only the patch version is bumped up 
would allow this task to be a no-brainer.

In a situation like this, specifiying the whole dependency version in 
`mix.exs` would act as an additional "protection" mechanism from updating 
minor versions, but I also think is generally more common to just specify 
MAJOR.MINOR making `--patch-version` useful.



On Monday, July 10, 2023 at 3:36:54 PM UTC+2 ma...@jonrowe.co.uk wrote:

> Hi Marco
>
> Are you aware that this behaviour is already facilitated by `mix.exs`? 
> When specifying your dependencies you can control how mix will look for 
> updates, using `~> 1.0.0` will mean `mix deps.update magico` will only 
> update to `1.0.3`, if you specify `~> 1.0` then it will update to 1.6.4 
> (minor) and if you specify `> 1.0.0` it would update to `2.0.9`
>
> Cheers
> Jon
>
> On Mon, 10 Jul 2023, at 1:54 PM, Marco Polita wrote:
>
> Adding a flag that would be considered by mix deps.update for updating 
> dependencies only to the latest patch or minor version, without bumping 
> minor or major.
>
> Example:
>
> package "magico" has the following releases:
> - 1.0.0
> - 1.0.3
> - 1.6.0
>
> - 1.6.4
> - 2.0.0
>
> Project "example"'s mix.lock file defines "magico" 1.0.0
>
> running the following commands in the project would have the following 
> outcomes
>
> `mix deps.update magico` would update to 2.0.0
> `mix deps.update magico --patch-version` would update to 1.0.3
>
> `mix deps.update magico --minor-version` would update to 1.6.4
>
> REASON:
>
> Facilitating the maintainance cycle of a project by allowing quicker, 
> safer dependencies bumps by updating only to the latest patched version.
>
>
> -- 
> 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 elixir-lang-co...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elixir-lang-core/c2f57392-435a-4721-b2f2-3c20612511ebn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elixir-lang-core/c2f57392-435a-4721-b2f2-3c20612511ebn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/67cfeaae-0b95-480d-a3c5-aed323c858a0n%40googlegroups.com.

Reply via email to