You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tasks.rustc-version-stable]
toolchain = "1.56" # required because we're using edition 2021
Unfortunately, by the time 1.57 stabilizes, the above will suddenly complain to devs using the latest stable release.
Describe The Solution You'd Like
Support a version check for the toolchain. Multiple syntaxes come to mind:
[tasks.rustc-version-stable]
toolchain = ">= 1.56"
toolchain = "stable >= 1.56"
toolchain = { channel = "stable", version = ">= 1.56" }
toolchain = { channel = "stable", feature = ["edition_2021"] } # optional, but most specific and declarative
The first two could perhaps be a short version of the second.
The last is probably too much to ask, but could use names from specific RFCs. Just don't know how to get rustc to tell me which ones are supported, and maintaining that list here is not such a good idea?
I am willing to implement this in a PR
It seems parsing the output of rustc --version is already done in rust_info, so perhaps it could be a good idea to reuse that and put it into the public interface there?
Feature Description
Unfortunately, by the time 1.57 stabilizes, the above will suddenly complain to devs using the latest stable release.
Describe The Solution You'd Like
Support a version check for the toolchain. Multiple syntaxes come to mind:
The first two could perhaps be a short version of the second.
The last is probably too much to ask, but could use names from specific RFCs. Just don't know how to get rustc to tell me which ones are supported, and maintaining that list here is not such a good idea?
It seems parsing the output of
rustc --version
is already done inrust_info
, so perhaps it could be a good idea to reuse that and put it into the public interface there?cargo-make/src/lib/toolchain.rs
Lines 60 to 68 in ee4e8b4
would then parse the output of
--version
additionally to checking succeeding and do the version comparison.For a real world example, consider https://github.com/yewstack/yew/blob/master/packages/yew-macro/Makefile.toml#L1-L5 which sets
toolchain = "1.51"
, to enforce support ofconst_generics
. Changing this totoolchain = ">= 1.51"
would run into less problems.The text was updated successfully, but these errors were encountered: