-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Build fails with rustc<=1.68.2 #2670
Comments
It's possible to get Rocket to compile on 1.66 with the following [dependencies]
rocket = "0.5.0"
pear = "0.2.7"
tokio-util = "0.6.10"
log = "0.4.20"
multer = "2.1"
percent-encoding = "2.3.1"
mime = "0.3.17"
serde = "1.0.193"
tempfile = "3.7"
tokio = "1.35"
either = "1.9" This means that the breakage is caused by some dependency and not Rocket itself. I really don't know what is causing this issue, but given the above, it should be possible to perform a bisect of sorts to find the culprit. My best guess is that this was "fixed" (i.e., masked) by rust-lang/rust#106745, though I don't know how. Given the above, I don't believe there's anything we can do in Rocket, short of downgrading whatever dependency is causing the issue. It would be nice, however, for us to go through all of the declared dependency versions in our |
Then, how about upgrading MSRV? The current MSRV is 1.56, as below. Line 17 in 92a2559
But now it is obvious that rocket is incompatible to |
That MSRV was correct until our dependencies went and upgraded their MSRV under us. If they were to downgrade their MSRV, Rocket would compile on 1.56, at least that's the theory. A different way to say that is that Rocket itself should compile with 1.56, but its dependencies appear to need at least 1.66, whereas at some point that wasn't the case. This is an issue with the MSRV Cargo.toml field in general: rust-lang/cargo#9930. I'm not really sure what the best course of action is. If we choose the min MSRV of all of our dependencies, we miss out on a lower MSRV if a dependency were to make that possible in an update. If we choose the min MSRV for Rocket itself, then the MSRV may be incorrect when dependencies are taken into consideration. There is no correct answer, it seems, at least not today. Even MSRV-aware dependency resolution is fraught with issues: you'd need to hold back updating dependencies, even when those updates are security sensitive. Perhaps the most practical answer is to choose the min MSRV across all dependencies at a point in time, or perhaps it's to eschew setting an MSRV altogether. |
Also includes a work-around for a buggy `format_args!` macro found in rustc 1.67 and 1.68. Resolves #2670.
Rocket Version
0.5.0
Operating System
macOS 14.1.2, ubuntu-latest in GitHub Actions
Rust Toolchain Version
rustc 1.68.2 (9eb3afe9e 2023-03-27)
What happened?
With rustc version <=1.68.2, compilation fails like this CI failure.
Test Case
Log Output
Additional Context
I guessed that some changes in 1.69.0 introduced this bug, so I digged 1.69.0 changes but couldn't find any obvious one. :cry
System Checks
rustc
toolchain.The text was updated successfully, but these errors were encountered: