Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

BoxPart for Codio for installing Rust and Cargo by means of the rustup.sh script #242

Merged
merged 1 commit into from
Dec 4, 2014

Conversation

sazzer
Copy link

@sazzer sazzer commented Dec 3, 2014

Rust is such a new language with so many changes happening all the time that it is often useful to have the absolute latest bleeding edge version installed. Rust-lang.org provide a shell script that will do this, and this Box Part makes use of that shell script to install the absolute latest version. (As such, the version I've put in is just "latest" and there's no SHA1 because this will possibly change very regularly)

…p.sh script to always get the bleeding edge version
@ksimuk
Copy link
Member

ksimuk commented Dec 4, 2014

Do not think this will work right in boxparts. the package will freeze rust version on moment I will do an archive. I still prefer update rust packages, or/and have the rustup script as a package, and allow user to install rust with that script manually.

@sazzer
Copy link
Author

sazzer commented Dec 4, 2014

There's nothing in the (current) rustup.sh script that relates to the version that will be installed. It simply downloads https://static.rust-lang.org/dist/rust-nightly-${HOST_TRIPLE}.tar.gz and https://static.rust-lang.org/cargo-dist/cargo-nightly-${HOST_TRIPLE}.tar.gz and installs those. As such, because the BoxPart refers to a shell script that itself doesn't contain versions then it should work.

It does mean that if you want to move to the current nightly build you need to uninstall and reinstall this BoxPart though, which is less than ideal...

However, if it's considered that BoxParts aren't the best way of installing something that is so fast moving - and that makes a lot of sense really - then I can perfectly understand that :)

@ksimuk
Copy link
Member

ksimuk commented Dec 4, 2014

Boxparts is a software repository, if you put a script into it, it will be a script. it stores not sources, but compiled version of software.

You used install method, boxparts will download the latest version of rustup and install rust to the package folder, in the way how boxparts works, that folder will be archived and uploaded to the binary repo at a moment of merge to the master branch, next time a user installing the package, not the rustup script will be downloaded, instead rustup the binary package will be used with the old version of rust. In this case you gets not the latest version of rust, but a version on moment the binary package was compiled.

if you ok with installing/reinstalling to update rust, the package should contains rustup script itself, and rust installation should happen in post_install method

@sazzer
Copy link
Author

sazzer commented Dec 4, 2014

Ah - so the built version of BoxParts will actually include the output of having run this script? I assumed that the Codio system would execute this script, which means that it would then download and run the rustup.sh script at the time the Codio VM is created, and would thus install the latest Rust and Cargo at the time the Part was installed on the Codio VM - since that's what the test system does when I wrote it. My apologies for misunderstanding it.

@ksimuk
Copy link
Member

ksimuk commented Dec 4, 2014

give me 15 min, will prepare a solution, may be it will work for you

@ksimuk
Copy link
Member

ksimuk commented Dec 4, 2014

check this #243, the Rust installation will happen on every parts install rustup call, is this you want?

@sazzer
Copy link
Author

sazzer commented Dec 4, 2014

Awesome. I've just tested it and that works perfectly. Thank you for this :)

@ksimuk ksimuk merged commit e77c91f into codio:master Dec 4, 2014
@ksimuk
Copy link
Member

ksimuk commented Dec 4, 2014

the package was merged. thank you

@sazzer
Copy link
Author

sazzer commented Dec 4, 2014

No - Thank you for your support on this :)

On 4 December 2014 at 11:31, Maxim Kraev notifications@github.com wrote:

the package was merged. thank you


Reply to this email directly or view it on GitHub
#242 (comment).

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

Successfully merging this pull request may close these issues.

None yet

2 participants