-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
plugins and various erlang versions #15
Comments
Unfortunately I don't have a good answer to any of these.
No, if you compile a rebar version against OTP 25 and then switch to OTP 24 it will break as you have observed.
No. The only "fix" is to uninstall and re-build with the rebar version with the OTP version you are currently using, defeating part of the point of the version manager.
I've thought about this some, and there are a couple ways I could solve this:
I'm inclined to go with that last option, as this is something that comes up a lot with asdf. There is of course a lot of work to make that happen, and some performance implications as well. Thoughts? |
Well, for context I also read asdf-vm/asdf#1127 and asdf-vm/asdf#196. I am also in favor of avoiding the complexity of a full dependency graph resolution in asdf (ordering in I like the idea of version tags, or having another version, but I don't really see an easy way to support it in asdf-vm in a generic way without seeing it blow up and become much complex than anticipated (the usual fate of package management systems). And leaving it to each plugin means the user needs to think and manage these... So:
I am not used to rebar3 much ( Ive just recently been trying to setup a C/Erlang/Elixir decent dev env), so I may be a bit off-track, but maybe the solution is in two parts:
So compared with your solution, I am thinking to make rebar build more generic, and keep the version hash trick for plugins only... Maybe less generic, but simple enough (no big asdf feature needed) ? Can you see any usecase in which that would be a no go ? |
Hi @asmodehn sorry for the late reply here.
Currently the Erlang version used to build a particular version of Rebar isn't recorded anywhere. This information is only available at install time, as an install may be run from any directory, and the environment may be changed at any time. Doing so would be possible, and then we'd have an
I guess I'm inclined to either do nothing, or go with the first option for now. Eventually we'll have some basic dependency management baked into asdf. If we implemented the first option, this is how it might work:
What do you think about this @asmodehn ? Feel free to take a stab at implementing this if you want. If once asdf itself supports dependency management this code could just be deleted. |
@Stratus3D, instead of building e.g. https://github.com/erlang/rebar3/releases/download/3.24.0/rebar3 AfaIk these are arch. agnostic and are compiled with at least OTP-2, which would partially prevent compatibility issues when using it locally with different Erlang versions. e.g.
will mean that that |
Another solution would be to create a
(?) In any case I think I'm gonna hack something locally and if results are promising I can pull request. |
Hi,
I have been using rebar, erlang and elixir via asdf for a little while now...
I seem to have issues when switching erlang versions:
From what I understand, plugins where compiled with otp v25, and I am now using v24.
I have a few questions:
Overall I d like to be able to switch rebar and erlang versions independently, or make the link with the OTP version somewhat more explicit...
Thank you for any information.
The text was updated successfully, but these errors were encountered: