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

.elixir-version support #54

Closed
wants to merge 1 commit into from
Closed

.elixir-version support #54

wants to merge 1 commit into from

Conversation

gitviola
Copy link

Support for .elixir-version file

This is the first approach to support .elixir-version files. It's inspired by rbenv for rubylang.

Commands

  • kiex install (without any version given)
  • kiex use (without any version given)

What it does

  1. The first .elixir-version file found by searching the directory of the script you are executing and each of its parent directories until reaching the root of your filesystem.
  2. The first .elixir-version file found by searching the current working directory and each of its parent directories until reaching the root of your filesystem.
  3. A global ~/.kiex/version file.

If none of these files are present it tells you to pass a version number along with the command.

@ThijsWouters
Copy link

I like the idea. But why would you add another file, when you can get the same information out of mix.exs.

@tsubery
Copy link

tsubery commented Dec 7, 2016

@ThijsWouters mix.exs defines elixir versions that are compatible with the project. This is not necessarily the same as the version a specific environment uses. For example. A project can support version 1.2 but use 1.3 for development.

@gitviola
Copy link
Author

gitviola commented Dec 8, 2016 via email

@ThijsWouters
Copy link

@schurig You don't need elixir or mix to parse the file, grepping works. The major pain would be something like "~> 1.2".

@tsubery Why would you develop in a different version than the minimum supported version? Wouldn't that increase the chance of using a function that is added to the newer version?

@tsubery
Copy link

tsubery commented Dec 8, 2016

@ThijsWouters I can think of a few reasons, Maybe you want security and performance benefits, avoiding specific bugs with some versions that don't affect the functionality of the project you are working on (maybe something with IEx?). You might also use the same elixir version on many different projects and want to work with one version that is compatible with all of them. Anyway, compatibility issues can arise when upgrading versions as well as downgrading so CI testing matrix is the way to go.

@keithmattix
Copy link

Any progress on this? I would really like to see this feature

@joshsmith
Copy link

Just pinging to see if there is any chance of using this or something similar.

@Stratus3D
Copy link

Hi all, asdf-elixir maintainer here. I'd also like to be able to get the Elixir version out of the project's mix.exs file. I've looked around and there doesn't seem to be a canonical way of accessing it without executing the file. But in order to execute the file, you must choose an Elixir version, which you cannot do until you know what version you should be using.

Of course grepping the file is an option, but it doesn't seem like a very elegant or reliable solution. Anyone have any thoughts on this?

I've opened up asdf-vm/asdf-elixir#48 for this issue.

@kovpack
Copy link

kovpack commented Oct 16, 2019

Any update on this?

@Stratus3D
Copy link

@kovpack see https://elixirforum.com/t/elixir-version-file-proposal/22422

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants