Hello, I'm curious what the value "d42e20054116c49d5242d3ff9e1913acccebe6015f449d6e312a5bc160e79a62" represents in the slice of the lockfile above. I've tried reading through the mix source code and feel like it has something to do with git, but I can't pinpoint it exactly.
The lock-related module in the mix source code has read and write lock methods (https://github.com/elixir-lang/elixir/blob/5984c6cc29a41d5bc78d49427730c8786d75e2c9/lib/mix/lib/mix/dep/lock.ex#L13) but doesn't say much about the map it deals with. The tests don't seem to hint at what this value represents either: https://github.com/elixir-lang/elixir/blob/9e40b8f786625b2f036ce9c2467cd0a8ade35ce6/lib/mix/test/mix/dep/lock_test.exs.
I thought it might be a git commit hash (either produced by my machine locally or pulled from the dependency's repo. I didn't find that hash in either place.
Any help is appreciated. Thanks!
This is a hash, used in the dependency convergence process. Roughly speaking, Mix.Dep.Converger
builds a :digraph
of dependencies and uses topology sort to determine whether the dependencies have diverged or not.
You would not be able to find it in Elixir/Mix source code because it’s delegating to the external converger, which depends on what type of dependency is it. In the case of :hex
type of dependency, remote is Hex.RemoteConverger
.
That said, this value is under full Hex.RemoteConverger
responsibility, mix
has zero clue about it. If you would like to provide another dependency source to mix
you could implement @behaviour Mix.RemoteConverger
and upon dependency convergence process, your converter implementation would be called with whatever arguments you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With