Skip to content
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

Fail to deploy due to incompatible version of rustc #527

Closed
snylonue opened this issue Dec 11, 2022 · 6 comments · Fixed by #545
Closed

Fail to deploy due to incompatible version of rustc #527

snylonue opened this issue Dec 11, 2022 · 6 comments · Fixed by #545
Labels
T-Bug Something isn't working

Comments

@snylonue
Copy link

snylonue commented Dec 11, 2022

log: cargo shuttle logs 4857c73c-aef9-4d44-a19a-2895ceca2b3d
environment: both Ubuntu in wsl2 and github actions
project: https://github.com/snylonue/annil-serverless

It works well if I run cargo shuttle run, but when running cargo shuttle deploy, it complains found crate * compiled by an incompatible version of rustc., even if I switched to the required rustc(rustc 1.59.0 (9d1b2106e 2022-02-23)).

What confuses me is that shuttle reports the rustc used is 1.63.0 while I have rustc 1.65.0 installed.

rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/sudo_snylonue/.rustup

installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
1.59.0-x86_64-unknown-linux-gnu 

active toolchain 
---------------- 
stable-x86_64-unknown-linux-gnu (default)
rustc 1.65.0 (897e37553 2022-11-02) 
@snylonue snylonue changed the title Fail to compile due to incompatible version of rustc Fail to deploy due to incompatible version of rustc Dec 11, 2022
@oddgrd
Copy link
Contributor

oddgrd commented Dec 16, 2022

Hey @snylonue, apologies for the delayed response. We have experienced this issue when deploying a few times before, it seems to be caused by crates that have a rust-toolchain.toml file to override the rust version used to compile their crate. We haven't been able to figure out how to avoid it happening yet, unfortunately. Which crate is it that reports as compiled with the wrong version (it should be one at the top, but then its dependencies will also be compiled with the same version)?

I also see you are using a git dependency in your manifest, which is not supported by the version of shuttle you are currently using (0.7.2). It is supported by the newly released 0.8.0 however, if you'd like to upgrade you can do a cargo install cargo-shuttle to install the new cli, and cargo project rm followed by cargo project new to rebuild your project container.

@snylonue
Copy link
Author

Which crate is it that reports as compiled with the wrong version

It first occurs when compiling dashmap v5.4.0, followed by hashbrown, parking_lot_core and other deps.
By the way, is it possible for me to override the rust compiler?

It is supported by the newly released 0.8.0 however

It is a great improvement.

@oddgrd
Copy link
Contributor

oddgrd commented Dec 16, 2022

Yeah, we've seen this before with dashmap and hashbrown. I have tried to override this behavior myself, but I haven't been able to yet. I have a few ideas I'm going to explore next week, I'll report back when I know more.

@oddgrd oddgrd added the T-Bug Something isn't working label Dec 16, 2022
@snylonue
Copy link
Author

snylonue commented Dec 17, 2022

I have successfully deployed by manually patching the crates with rust-toolchain.toml, which can be served as a temporary fix.

@oddgrd
Copy link
Contributor

oddgrd commented Dec 17, 2022

Ah of course, that's possible now. Good thinking @snylonue, thanks!

@oddgrd oddgrd linked a pull request Dec 30, 2022 that will close this issue
@chesedo chesedo closed this as completed Dec 30, 2022
sd2k added a commit to sd2k/axum that referenced this issue Jan 2, 2023
It's breaking shuttle builds, see
shuttle-hq/shuttle#527.
sd2k added a commit to sd2k/recipes that referenced this issue Jan 2, 2023
The rust-toolchain file in axum-macros is causing issues with shuttle deploys
(see shuttle-hq/shuttle#527) so let's just not
include it for now.
sd2k added a commit to sd2k/recipes that referenced this issue Jan 2, 2023
The rust-toolchain file in axum-macros is causing issues with shuttle deploys
(see shuttle-hq/shuttle#527) so let's just not
include it for now.
@snylonue
Copy link
Author

snylonue commented Jan 19, 2023

@oddgrd When will the fix get deployed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants