Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Elixir version from mix.exs file #48

Open
Stratus3D opened this issue May 12, 2018 · 1 comment
Open

Read Elixir version from mix.exs file #48

Stratus3D opened this issue May 12, 2018 · 1 comment

Comments

@Stratus3D
Copy link
Member

Stratus3D commented May 12, 2018

In addition to the .exenv-version file, asdf-elixir should also be able to read the Elixir version out of a mix.exs file in the current directory.

See this related issue for kiex: taylor/kiex#54

@dbernheisel
Copy link
Contributor

dbernheisel commented Oct 11, 2018

I like this!

Couple questions:

  • I'm not sure how this will account for different OTP versions that Elixir could be compiled with. Do you see something that could help find this? I don't see anything in mix.exs that specifies the OTP version, unless folks just add it. For example:

    def project() do
      [
        app: :my_app,
        version: File.read!("VERSION") |> String.trim(),
        elixir: "~> 1.5",
        otp: "21"
      ]
    end
  • Let's say that 1.5.2 is the latest Elixir version, and mix.exs specifies elixir: "~> 1.5". At the time asdf install is ran, does it fetch the latest 1.5.x version or earliest? If latest, and then later 1.5.3 releases, should asdf install require 1.5.3? Would asdf say the "specified" version is not yet installed, or would it be satisfied? I figure if folks want a specific version of Elixir for their app, they could specify elixir: "1.5.2" instead. Should there be a .tool-versions.lock generated until explicitly told to upgrade? (I figure this is a bigger question for asdf).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants