Gitpod has Rust 1.35 installed but the latest stable release is 1.37. I tried running "rustup update" but it didn't work. Could it be upgraded please?
Oh, thanks for letting us know @StephenWassell. If you have the time, could you please paste the error log printed by ārustup updateā?
Our workspace images havenāt been updated in a while (and thatās partly my fault), but weāre in the process of upgrading them from Ubuntu Cosmic (reached End Of Life last month) to Ubuntu Disco, which should happen some time next week. And with that upgrade will come a more recent version of Rust too.
Our goal is to keep all tools at their latest stable version, to completely factor out āupgrading toolsā from the development workflow. Iāll update this issue when weāve deployed the image upgrade.
@StephenWassell it looks like 1.39.0 is not on stable yet: https://github.com/rust-lang/rust/blob/master/RELEASES.md
But you can always install specific compilers with a .gitpod.yml and a Dockerfile like this:
.gitpod.yml:
image:
file: .gitpod.Dockerfile
.gitpod.Dockerfile:
FROM gitpod/workspace-full
USER gitpod
RUN bash -lc "rustup default nightly-2019-08-18"
USER root
For reference, see the docs.
FYI, the upgrade to Ubuntu Disco was deployed to Docker Hub (all images), and will become the default image for Gitpod workspaces with the next deploy (hopefully this week).
And it comes with Rust 1.37:
gitpod /workspace/theia $ rustc --version
rustc 1.37.0 (eae3437df 2019-08-13)
Sure, here's the log from rustup update:
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-08-15, rust version 1.37.0 (eae3437df 2019-08-13)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: downloading component 'rust-std' for 'x86_64-unknown-linux-musl'
info: downloading component 'rust-src'
info: downloading component 'rust-analysis'
info: downloading component 'rls'
info: removing component 'rustc'
info: rolling back changes
error: could not rename component file from '/home/gitpod/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin' to '/home/gitpod/.rustup/tmp/9rc67qemmikeviy4_dir/bk'
error: rustup is not installed at '/workspace/.cargo'
@StephenWassell Yes, this is a known issue. Due to our persistence strategy (currently we persist /workspace only) we have to configure language tools in a way they store their packages there. Rustup does not like that.
It works if you it in the Docker file as described above, thought.
Hi again @StephenWassell, I forgot to mention that the Rust upgrade was deployed 2 days ago. Works like a charm! š
Thanks again for reporting this bug. I'll close this issue for now, but if you can, please report any other misbehavior you notice from rustup or any other component in Gitpod.
Thanks for the update! Sorry for not replying earlier, I didn't get a chance to log in recently. And thanks for providing such a great service as Github!
@jankeromnes Rust 1.39 is out now; it has async/await and a lot of people might be trying out async projects on gitpod. Would you be able to update to it?
@coolreader18 Created a PR: https://github.com/gitpod-io/workspace-images/pull/131
Ah cool, thanks; I didn't know that the workspace images were on GitHub.