From b76050e0a090320ecf59e25f9ca7697be3244d9f Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Thu, 2 Nov 2023 15:27:45 -0700 Subject: [PATCH] internal: Migrate to proto v0.21 version types. (#13) --- Cargo.lock | 175 +++++++++++++++++++---------------------- Cargo.toml | 12 +-- src/helpers.rs | 37 +++++++++ src/lib.rs | 3 + src/proto.rs | 53 +++++-------- tests/download_test.rs | 6 +- tests/metadata_test.rs | 5 +- tests/versions_test.rs | 4 +- 8 files changed, 154 insertions(+), 141 deletions(-) create mode 100644 src/helpers.rs diff --git a/Cargo.lock b/Cargo.lock index 45a30c4..4b479e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,13 +130,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -245,7 +245,7 @@ dependencies = [ "ahash", "cached_proc_macro", "cached_proc_macro_types", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "instant", "once_cell", "thiserror", @@ -692,7 +692,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -714,7 +714,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -896,9 +896,9 @@ dependencies = [ [[package]] name = "extism" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a94848d5b49906bd97b83cf5a8bd25082dbc6f8bdfe98f12687910228734552" +checksum = "67e81d3e7d1592412579984e773bd553703a664bbfb1ddded742bf6dfae63847" dependencies = [ "anyhow", "extism-manifest", @@ -941,14 +941,14 @@ checksum = "d2be216330f7304de051e0faf1578880e9e0dc1ecbd2c0fea5765c63a079d0ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "extism-runtime" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b0ba8ef6ecbf59c0f6e47fd2feea575ebc3a09e81603d06a41af92fe61cdfa" +checksum = "126b884cfa74fc386eedff1095bac8ef6c2ae5efdb656e508f12a41434d0bf0c" dependencies = [ "anyhow", "cbindgen", @@ -1015,9 +1015,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1091,7 +1091,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1240,9 +1240,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ "ahash", "allocator-api2", @@ -1433,14 +1433,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", ] [[package]] name = "insta" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa511b2e298cd49b1856746f6bb73e17036bcd66b25f5e92cdcdbec9bd75686" +checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" dependencies = [ "console", "lazy_static", @@ -1742,7 +1742,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1847,12 +1847,12 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "once_map" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169e72192bc84493725bfca5d47da4ee2abc8acf155586d8127eb17f022497f4" +checksum = "3388ad2ab0b17d90355995011856a3337e0a98147950f076ee9a73ad5d4a553e" dependencies = [ "ahash", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "parking_lot", "stable_deref_trait", ] @@ -2001,18 +2001,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "proto_core" -version = "0.20.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3ec2a09d2419150c2a05f4a02a0db67daa01bdf7579b9109772d0861327b8b" +checksum = "4ea826b40e2682f5eb5ee90d1065e09a710ec74807f5c7db85aa3c5fb397623e" dependencies = [ "cached", "extism", @@ -2021,7 +2021,6 @@ dependencies = [ "minisign-verify", "once_cell", "proto_pdk_api", - "proto_wasm_plugin", "regex", "reqwest", "semver", @@ -2042,9 +2041,9 @@ dependencies = [ [[package]] name = "proto_pdk" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fb8a833e33fcb2ea79324ef89b5e631b8aadc3c7c11bdf4bc7ca25ec716858" +checksum = "ce0b4fe64801579bbf1c341db7c6bf9b67cd2d58e3bf32d28b6fd69908cfe102" dependencies = [ "anyhow", "extism-pdk", @@ -2054,9 +2053,9 @@ dependencies = [ [[package]] name = "proto_pdk_api" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c05662171d4984a9fd57e7fc33a071e0822bb2e993b7a1d06ce9dc5847698b6" +checksum = "a0d49bf81e0c2033a4660270a2c8ff6f331ba0cb61500c6d3dc41d8f18cd5ce3" dependencies = [ "anyhow", "semver", @@ -2064,35 +2063,22 @@ dependencies = [ "serde_json", "system_env", "thiserror", + "version_spec", "warpgate_api", ] [[package]] name = "proto_pdk_test_utils" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc75a9923b630193bef09734147636f45e5857ff33d8511fbb1e3ccffe5e1ad" +checksum = "fb47a6bf9be024ae8690f62e6e9c3e0c2537e9071c1562a74564bf70378b8a80" dependencies = [ "extism", "proto_core", "proto_pdk_api", - "proto_wasm_plugin", "serde_json", ] -[[package]] -name = "proto_wasm_plugin" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4ff89bb77f5f4ce5dd9536200c73140acaef632d33cacb59e12a2a8c8f3d7d" -dependencies = [ - "extism", - "proto_pdk_api", - "serde_json", - "starbase_utils", - "tracing", -] - [[package]] name = "psm" version = "0.1.21" @@ -2344,7 +2330,7 @@ dependencies = [ "serde", "starbase_sandbox", "tokio", - "toml 0.8.2", + "toml 0.8.6", ] [[package]] @@ -2515,9 +2501,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] @@ -2534,13 +2520,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2556,9 +2542,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -2683,9 +2669,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "starbase_archive" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ad85bff80a5ec20265e65a69102eee54ae1e4dac9f977256fbf770c7153fa1" +checksum = "935856c30da2f62a73bcc57eecb5508bedd313287bc0e00e7e7c4b7a07fb5995" dependencies = [ "flate2", "miette", @@ -2697,14 +2683,14 @@ dependencies = [ "tracing", "xz2", "zip", - "zstd 0.12.4", + "zstd 0.13.0", ] [[package]] name = "starbase_events" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f172a2185991dbfb2a3446c47749ade52d66d2aaea724d19bd45607527ebd9d" +checksum = "455a107aab23fa941399ed716e42776ac8e200f5f92706b7ce59b08949aaf153" dependencies = [ "async-trait", "miette", @@ -2714,21 +2700,21 @@ dependencies = [ [[package]] name = "starbase_macros" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63159597180d00c01353e4bf4d4401328a30eb618c0130adf7b9371db4df3d3a" +checksum = "70da3be1ac772cd1cf5b71a725988b64829da92664b8fc362be765462c28638c" dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "starbase_sandbox" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c63f6daf91fb1cb95ac13ff5f5bf57d0657060519d137cfff6d1a0a690dbc" +checksum = "49d8cc34f93dd97db45ad1a7240bc03e01ee8478af003f8d945e8031585a4f11" dependencies = [ "assert_cmd", "assert_fs", @@ -2753,9 +2739,9 @@ dependencies = [ [[package]] name = "starbase_utils" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b5dc77ea8ee6706f6485f931653277a4bfe04a2d127727e018b082fbfe52b3" +checksum = "f9faf731068b919569efae7f6c7c6c3d2e29411c1cba666ef0c6fe20b82f50a1" dependencies = [ "dirs 5.0.1", "fs4", @@ -2769,7 +2755,7 @@ dependencies = [ "starbase_styles", "thiserror", "tokio", - "toml 0.8.2", + "toml 0.8.6", "tracing", "wax", ] @@ -2803,9 +2789,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -2851,9 +2837,9 @@ dependencies = [ [[package]] name = "system_env" -version = "0.0.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a5b2f67543171658346f56eba6978221227dd79541a6b1fdb2b2f9116ed640" +checksum = "a9a9eb72230d28d8116aab631232e98675a7fd3e69b81b046d54205bd21e16d5" dependencies = [ "serde", "serde_json", @@ -2938,7 +2924,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3025,7 +3011,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3075,21 +3061,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.7", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -3109,9 +3095,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.0.0", "serde", @@ -3146,7 +3132,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -3286,9 +3272,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "version_spec" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5babc3fe9e74e0559d8f8a825b6dcfec6f0dbf04db30926eaaf3caddcb4fb8ef" +checksum = "e5e3bdf3e63b4025522cf6a324e3c4f8f0f29a9148de2392d980c10f22b134c7" dependencies = [ "human-sort", "once_cell", @@ -3327,9 +3313,9 @@ dependencies = [ [[package]] name = "warpgate" -version = "0.5.10" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52eeb90e962c1310c0bfe7d066f4a7fe032f01dd94f6ee3d983167c90596a7f7" +checksum = "31378533107129c8dcc2cc8b2333768a21374ccecc735d33c468b4ebe747b225" dependencies = [ "extism", "miette", @@ -3434,7 +3420,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -3468,7 +3454,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4251,11 +4237,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ - "zstd-safe 6.0.6", + "zstd-safe 7.0.0", ] [[package]] @@ -4270,11 +4256,10 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.6" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" dependencies = [ - "libc", "zstd-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 902d3e0..56c0b78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,14 +10,14 @@ crate-type = ['cdylib'] [dependencies] extism-pdk = "0.3.4" -proto_pdk = { version = "0.8.0" } # , path = "../../proto/crates/pdk" } -serde = "1.0.189" -toml = "0.8.2" +proto_pdk = { version = "0.9.0" } # , path = "../../proto/crates/pdk" } +serde = "1.0.190" +toml = "0.8.6" [dev-dependencies] -proto_pdk_test_utils = { version = "0.8.2" } # , path = "../../proto/crates/pdk-test-utils" } -starbase_sandbox = "0.1.11" -tokio = "1.33.0" +proto_pdk_test_utils = { version = "0.9.1" } # , path = "../../proto/crates/pdk-test-utils" } +starbase_sandbox = "0.1.12" +tokio = { version = "1.33.0", features = ["full"] } [profile.release] codegen-units = 1 diff --git a/src/helpers.rs b/src/helpers.rs new file mode 100644 index 0000000..4f4304a --- /dev/null +++ b/src/helpers.rs @@ -0,0 +1,37 @@ +use extism_pdk::*; +use proto_pdk::*; +use std::path::PathBuf; + +#[host_fn] +extern "ExtismHost" { + fn get_env_var(name: &str) -> String; +} + +pub fn get_rustup_home(env: &HostEnvironment) -> Result { + // Variable returns a real path + Ok(host_env!("RUSTUP_HOME") + .map(PathBuf::from) + // So we need our fallback to also be a real path + .unwrap_or_else(|| env.home_dir.real_path().join(".rustup"))) +} + +pub fn get_channel_from_version(spec: &VersionSpec) -> String { + if spec.is_canary() { + "nightly".to_owned() + } else { + spec.to_string() + } +} + +pub fn is_non_version_channel(spec: &UnresolvedVersionSpec) -> bool { + match spec { + UnresolvedVersionSpec::Canary => true, + UnresolvedVersionSpec::Alias(value) => { + value == "stable" + || value == "beta" + || value == "nightly" + || value.starts_with("nightly") + } + _ => false, + } +} diff --git a/src/lib.rs b/src/lib.rs index 68cda60..8d89e9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,9 @@ mod toolchain_toml; // WASM cannot be executed through the test runner and we need to avoid building // WASM code for non-WASM targets. We can solve both of these with a cfg flag. +#[cfg(not(test))] +mod helpers; + #[cfg(not(test))] mod proto; diff --git a/src/proto.rs b/src/proto.rs index 177ec98..a83d2c7 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -1,3 +1,4 @@ +use crate::helpers::*; use crate::toolchain_toml::ToolchainToml; use extism_pdk::*; use proto_pdk::*; @@ -7,20 +8,11 @@ use std::path::PathBuf; #[host_fn] extern "ExtismHost" { fn exec_command(input: Json) -> Json; - fn get_env_var(name: &str) -> String; fn host_log(input: Json); } static NAME: &str = "Rust"; -fn get_rustup_home(env: &HostEnvironment) -> Result { - // Variable returns a real path - Ok(host_env!("RUSTUP_HOME") - .map(PathBuf::from) - // So we need our fallback to also be a real path - .unwrap_or_else(|| env.home_dir.real_path().join(".rustup"))) -} - #[plugin_fn] pub fn register_tool(Json(_): Json) -> FnResult> { let env = get_proto_environment()?; @@ -28,7 +20,7 @@ pub fn register_tool(Json(_): Json) -> FnResult, ) -> FnResult> { - exec_command!( - inherit, - "rustup", - ["toolchain", "uninstall", &input.context.version] - ); + let channel = get_channel_from_version(&input.context.version); + + exec_command!(inherit, "rustup", ["toolchain", "uninstall", &channel]); Ok(Json(NativeUninstallOutput { uninstalled: true, @@ -170,10 +157,6 @@ pub fn load_versions(Json(_): Json) -> FnResult bool { - value == "stable" || value == "beta" || value == "nightly" || value.starts_with("nightly") -} - #[plugin_fn] pub fn resolve_version( Json(input): Json, @@ -182,9 +165,9 @@ pub fn resolve_version( // Allow channels as explicit aliases if is_non_version_channel(&input.initial) { - output.version = Some(input.initial); - } else if input.initial == "canary" { - output.version = Some("nightly".into()); + output.version = Some(VersionSpec::Alias(input.initial.into())); + } else if input.initial.is_canary() { + output.version = Some(VersionSpec::Alias("nightly".into())); } Ok(Json(output)) @@ -205,13 +188,13 @@ pub fn parse_version_file( if input.file == "rust-toolchain" { if !input.content.is_empty() { - output.version = Some(input.content); + output.version = Some(UnresolvedVersionSpec::parse(input.content)?); } } else if input.file == "rust-toolchain.toml" { let config: ToolchainToml = toml::from_str(&input.content)?; if let Some(channel) = config.toolchain.channel { - output.version = Some(channel); + output.version = Some(UnresolvedVersionSpec::parse(channel)?); } } @@ -269,13 +252,15 @@ pub fn sync_manifest(Json(_): Json) -> FnResult