Kshitij Mittal
Kshitij Mittal

Reputation: 2766

How to get older tag of a git repository in elixir via mix file

I am trying to install an older version of a library cqerl through mix.exs file in elixir.

This is how my code looks:

 defp deps do
    [
      {:cqerl, git: "https://github.com/matehat/cqerl.git",tag: "v0.9.0"}
    ]

But for some reason, instead of installing the 0.9.0 tag, it is installing the latest tag.

I would like to know what's wrong with my code and how can I correctly pull the right tag from Cqerl repository.

TIA :)

Upvotes: 1

Views: 706

Answers (2)

keroro520
keroro520

Reputation: 469

after modifying repo's tag in mix.exs, you should execute mix deps.update cqerl, which would update mix.lock and use the modified tag.

Upvotes: 0

Kshitij Mittal
Kshitij Mittal

Reputation: 2766

I had to delete the mix.lock file as well along with the deps folder. So, basically I did the following:

rm mix.lock
rm -rf deps/
mix deps.get

That way, it worked.

I am using Elixir version 1.2.4 right now, and this is a bug in mix. I came to know later that it has been fixed in master via elixir-lang irc.

Upvotes: 1

Related Questions