Why are both rust-version and rust-toolchain.toml used? #3907
Replies: 4 comments 21 replies
-
|
We want to pin our builds to a specific version, because that is what we have tested. Setting to stable can suddenly break the pipeline or other issues. The You can override the rust version via |
Beta Was this translation helpful? Give feedback.
-
|
I don't see what the issue is with using both. I mean the initial assumption that they would get out-of-sync somehow (and also frequently) is baseless. Why would you assume that we would ever update
Correct me if I'm wrong, but if you don't use As @BlackDex already explained (#3907 (comment)), if you don't want to use the suggested toolchain, you can override which version to use (i.e. you can run So to me both files are merely suggestions and I also would not say that we guarantee anything with regards to supported versions (this is still an open source project maintained by unpaid volunteers in their free time). It's just that we only test those when building: vaultwarden/.github/workflows/build.yml Lines 38 to 41 in bbd630f The backwards compatibility claim (that you can compile with newer versions of rust) is one that rust makes (i.e. if you use a newer version than the MSRV and it has a fatal flaw in it that prevents building the project than you should report it to the rust project). We only test the MSRV to make sure that we don't use the latest features that a new version provides (and we will only accept PRs that rely on it when we have determined that the feature is stable enough, i.e. two versions later when the version is the new MSRV). This would not be possible without |
Beta Was this translation helpful? Give feedback.
-
|
This has gone long enough though, so we will agree to disagree. Thanks for your time. |
Beta Was this translation helpful? Give feedback.
-
|
Wow this thread was friday night popcorn. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the point of specifying the minimum
rustcversion viarust-versioninCargo.tomlif you are going to force a specific toolchain viarust-toolchain.toml? Having both means having to keep track of two separate things that frequently go out of sync; and worse, if one updatesrust-versionsuch that it's newer than what is inrust-toolchain.toml, one will needlessly install the specified toolchain just for the compiler to fail with a message that the toolchain is not new enough. Seems to me that it's better to removerust-versionfromCargo.tomlor allow newer toolchains to be used and removerust-toolchain.tomlinstead. I realize that if you have to go back to usingnightly, thenrust-toolchain.tomlis your only option.Beta Was this translation helpful? Give feedback.
All reactions