Closed gitviola closed 2 years ago
I like the idea. But why would you add another file, when you can get the same information out of mix.exs
.
@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.
@ThijsWouters I was thinking of that first (or even write a method that returns the version number. But if there is no Elixir version installed at all it would be a pain to parse the mix.exs file since it can't be run.
On Thu, 8 Dec 2016 at 00:21, Gal Tsubery notifications@github.com wrote:
@ThijsWouters https://github.com/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.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taylor/kiex/pull/54#issuecomment-265605441, or mute the thread https://github.com/notifications/unsubscribe-auth/ACjHHXELPGBaEPBwe-yHMKLZ61FkOUJVks5rFz9mgaJpZM4JpSEI .
@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?
@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.
Any progress on this? I would really like to see this feature
Just pinging to see if there is any chance of using this or something similar.
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 https://github.com/asdf-vm/asdf-elixir/issues/48 for this issue.
Any update on this?
Support for
.elixir-version
fileThis is the first approach to support
.elixir-version
files. It's inspired byrbenv
for rubylang.Commands
kiex install
(without any version given)kiex use
(without any version given)What it does
.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..elixir-version
file found by searching the current working directory and each of its parent directories until reaching the root of your filesystem.~/.kiex/version
file.If none of these files are present it tells you to pass a version number along with the command.