-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Support installing multiple release channels #19263
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
Comments
Semi-related: I have been wondering whether we should start distributing a wrapper script for invoking I saw a user recently who untarred the Update: Oh, the reason that this is related to this topic is that a wrapper script can be written to support multiple release channels, either by having multiple scripts that point to the different spots as necessary, or by having a single script that reflectively dispatches on |
There is endless precedence for this kind of tooling in the Ruby/Python |
@steveklabnik, right. At some point we might also want to do this by version numbers (e.g. have Rust 1.3 next to 1.4) in addition to release channels. |
The obvious problem with putting a bunch of same-named libraries next to each other is that they are going to cause resolution conflicts. We might resolve that by attaching a unique id to each build of the compiler and associating every library with that build. That will have some impact on distributing binary libs (which presumably nobody does currently). The docs are also going to cause naming conflicts as well as some of the other supplementary files. Have to consider all the different ways of installing Rust and whether and how to make them all compatible with multi-rust. |
Note that our makefiles specify a 'extra filename' paramter to be mixed into all filenames: Line 18 in 7222ba9
We could tweak that per-release channel in theory. The binaries themselves won't have it mixed in, though (just the libs). |
I agree with @pnkfelix . It should suffice to extract as many TAR archives as the user wish under the common "base" directory in a parallel manner. They can coexist and uninstalling one of them is as simple as *nixWe can simply provide a wrapper shell script to choose one of multiple installations:
We can enhance this wrapper following battle-tested tools such as To those who likes nitpicking: not setting WindowsThe idea is the same as the *nix case. Instead of |
@nodakai another option for Windows is a wrapper (I do not do much Windows hacking; I just remembered that we used a trick like this in the Larceny project: larceny.bat, and I think a batch file will be easier for end-users to modify/maintain than a wrapper executable.) |
It’s maybe not as essential that all of the ways to install support this, as long as some of them do. In particular, the packages for Rust release and nightly in my distribution currently conflict, and I’d like them not to :) IMO it’s ok if packagers need to do a small amount of work (like passing the right |
I have a project that supports installation of multiple Rusts https://github.com/brson/multirust. It depends a bit on the upcoming release channel and installer infrastructure. |
Hello, I am a co-maintainer of rust on Gentoo. Are there any updates on this issue? What is the appropriate way to install multiple release channels? Thanks much, William |
I believe the compiler itself can add support for things (though I’m not sure what exactly) to make this easier. In the meantime: Brian has been working on https://github.com/brson/multirust , which I believe is the best we can do right now. You probably don’t want to import it as-is into the Gentoo packaging system, but you could take ideas. Specifically, it "installs" different Rust versions in different directories. (It just extracts tarballs with pre-built binaries, but I believe it’s equivalent to building with |
Triage: multirust has matured significantly. |
Here's one unfortunate case where multirust doesn't help, and other than bringing back rtool I'm not sure what will. It seems like it should be a non-negotiable requirement that one can run a program after building it without having to invoke any black magic between build and run.
|
@williamh Just to mention it, Gentoo deals with multiple rust installations already and names them e.g. So there is the overlay called rust (obviously) which contains the special versions rust-9999 (git) and rust-999 (nightly). Would it be possible to have rust (binary named *-stable), rust-beta and rust-nightly in this repo? This way I could test libraries much more easily for stable/beta/nightly compatibility. Edit: Sorry, I did not see before that the portage (non-overlay) is also rust:stable and the rust-999 of the overlay is rust:nightly. Still, the beta is missing. |
I believe multirust is basically our answer here, so closing, yay! |
Now if only we had a Windows equivalent! |
Rust is going to have three release channels: stable, beta, and nightly. Each of them has its use (that’s why they exist), so it will probably be common to have more than one of them installed at the same time on the same machine (such as a developer’s laptop).
Currently, this it is possible to install multiple rusts at different locations, and set up the
PATH
and (since the [rpath removal])LD_LIBRARY_PATH
environment variables to pick one of them. However this is error-prone and not very convenient.It would be better if multiple versions could be installed in the same "prefix" (e.g.
/usr
, where the default environment variables Just Work®). Executables could have a suffix to distinguish them, for example/usr/bin/rustc
(stable),/usr/bin/rustc-beta
and/usr/bin/rustc-nightly
. Other files would have to be namespaced somehow to avoid conflicts.(Corresponding Cargo issue: rust-lang/cargo#967)
The text was updated successfully, but these errors were encountered: