From 67568f5a1eee0f180043837791408c06e2c9d1e5 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Thu, 31 Oct 2024 16:42:19 -0700 Subject: [PATCH] deps: Update plugins. (#647) --- CHANGELOG.md | 31 ++- Cargo.lock | 225 +++++++++--------- Cargo.toml | 22 +- crates/cli/Cargo.toml | 12 +- crates/cli/src/commands/install.rs | 7 +- crates/cli/src/commands/plugin/info.rs | 2 +- ...t__plugins__builtins__supports_python.snap | 13 +- crates/codegen/Cargo.toml | 4 +- crates/core/Cargo.toml | 4 +- crates/core/src/error.rs | 14 ++ crates/core/src/flow/link.rs | 5 +- crates/core/src/flow/locate.rs | 6 +- crates/core/src/flow/resolve.rs | 1 + crates/core/src/proto_config.rs | 18 +- crates/core/src/tool.rs | 23 ++ crates/pdk-api/Cargo.toml | 2 +- crates/pdk-api/src/api/mod.rs | 9 +- crates/pdk-test-utils/Cargo.toml | 7 +- crates/pdk-test-utils/src/macros.rs | 10 +- crates/pdk-test-utils/src/sandbox.rs | 3 +- crates/pdk-test-utils/src/wrapper.rs | 8 +- crates/pdk/Cargo.toml | 6 +- crates/warpgate-pdk/Cargo.toml | 2 +- crates/warpgate-pdk/src/macros.rs | 5 +- rust-toolchain.toml | 2 +- 25 files changed, 258 insertions(+), 183 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e74121a33..fdc9055ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,13 +15,14 @@ #### 💥 Breaking - Each tool's primary executable file name is no longer based on the plugin's identifier, and is now based on what's configured in the new `LocateExecutablesOutput.exes` setting. -- We've reworked how the `~/.proto/bin` directory works. Instead of only symlinking globally pinned versions, we now create a symlink for every tool executable, and every major + minor version installed within that tool. For example, when we install `node`, we may have the following: +- We've reworked how the `~/.proto/bin` directory works. Instead of only symlinking globally pinned versions (from `~/.proto/.prototools`), we now create a symlink for every tool executable, and every major + minor version installed within that tool. For example, when we install `node`, we may have the following: - `~/.proto/bin/node` - Points to the highest installed version. - `~/.proto/bin/node-` - Points to the highest version within that major range (`~major`). Is created for each separate major version, for example: `node-20`, `node-22`. - `~/.proto/bin/node-.` - Points to the highest version within that major + minor range (`~major.minor`). Is created for each separate major + minor version, for example: `node-20.1`, `node-22.4`. - `~/.proto/bin/node-canary` - Points to a canary install, if it exists. - WASM API - Deprecated `LocateExecutablesOutput.primary` and `LocateExecutablesOutput.secondary` (use `exes` instead). + - Updated `ToolMetadataOutput.plugin_version` to a `Version` type instead of `String`. #### 🚀 Updates @@ -30,6 +31,34 @@ - WASM API - Added `ExecutableConfig.primary`. - Added `LocateExecutablesOutput.exes`. + - Added `ToolMetadataOutput.minimum_proto_version`. + - Added `ParseVersionFileInput.path`. + +#### 🐞 Fixes + +- Fixed an issue where `proto upgrade` would pin `proto` to `~/.proto/.prototools`. + +#### 🧩 Plugins + +- Updated `bun_tool` to v0.14. +- Updated `deno_tool` to v0.13. +- Updated `go_tool` to v0.14. +- Updated `node_tool` to v0.13. +- Updated `node_depman_tool` to v0.14. + - Added support for `volta.extends`: https://docs.volta.sh/advanced/workspaces + - Updated `volta` to take precedence over `engines` in `package.json`. +- Updated `python_tool` to v0.12. + - Removed `python` and `pip` executables. Use the new bins feature instead. + - Added `~/.local/bin` as a globals lookup directory. +- Updated `rust_tool` to v0.12. +- Updated `schema_tool` to v0.16. + - Removed `platform.*.bin-path` support (use `exe-path` instead). + - Deprecated `install.primary` and `install.secondary`. + - Added `install.exes` for defining primary and secondary executables. + +#### ⚙️ Internal + +- Updated Rust to v1.82. ## 0.41.7 diff --git a/Cargo.lock b/Cargo.lock index 0e2de72be..0e1c7e08a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -85,43 +85,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "arbitrary" @@ -267,9 +267,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -279,9 +279,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "bzip2" @@ -398,9 +398,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.28" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -413,6 +413,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -451,9 +457,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.33" +version = "4.5.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9646e2e245bf62f45d39a0f3f36f1171ad1ea0d6967fd114bca72cb02a8fcdfb" +checksum = "86bc73de94bc81e52f3bebec71bc4463e9748f7a59166663e32044669577b0e2" dependencies = [ "clap", ] @@ -500,9 +506,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "comfy-table" @@ -1004,9 +1010,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1029,9 +1035,9 @@ dependencies = [ [[package]] name = "extism" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c352d53d63c58d66868b65246ec491dab9c78b7425d2d221f0219d97765a3548" +checksum = "c3da59fba4da905210ef7c4c2a9f784717de54afbfb3f07414de5b0b15d5ecc8" dependencies = [ "anyhow", "cbindgen", @@ -1055,9 +1061,9 @@ dependencies = [ [[package]] name = "extism-convert" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2042dab1fdb408d7504446cfb10079815da8b45e192a8954bf568c8a43e65d" +checksum = "96b6253fe1e378abdd0fd9fd01b53aa8757c6827cd3c48794b417e542d088d0e" dependencies = [ "anyhow", "base64 0.22.1", @@ -1071,9 +1077,9 @@ dependencies = [ [[package]] name = "extism-convert-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb2f0038f2c3b14daa95b132f4fc1bad786a92946c7c9c06e120985a1fc4028" +checksum = "7022773c485da2122413c2edbf50b7dee135b6577cc5ac42dccc307e347ac5d6" dependencies = [ "manyhow", "proc-macro-crate", @@ -1084,9 +1090,9 @@ dependencies = [ [[package]] name = "extism-manifest" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675c0d7e15bb5e6e2a520ea26c4309c047c30b16de852f26373de1906677a58d" +checksum = "cca9129d54add3090148a17444879256b4ec3fd7c4269d2780cd70050232edda" dependencies = [ "base64 0.22.1", "serde", @@ -1095,9 +1101,9 @@ dependencies = [ [[package]] name = "extism-pdk" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0334e38735348bd085e518bfc284395fcb5c198ba65ce36f9712bd25ff9e7be0" +checksum = "ccd50f3ebae4132239ee188c00d91bda2b283db007213dd4bd6f3b4be4d3f82c" dependencies = [ "anyhow", "base64 0.22.1", @@ -1110,9 +1116,9 @@ dependencies = [ [[package]] name = "extism-pdk-derive" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4b8ea80a1b89cf8b053bdc5df2385125bcb9110d19be289c2030c61c7c6ad9" +checksum = "b3a225e26f498571c273e095d9c2437acb0fd5d6ef3cb88d284d7e2d037d4d10" dependencies = [ "proc-macro2", "quote", @@ -1504,9 +1510,9 @@ checksum = "140a09c9305e6d5e557e2ed7cbc68e05765a7d4213975b87cb04920689cc6219" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1542,9 +1548,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1647,9 +1653,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6593a41c7a73841868772495db7dc1e8ecab43bb5c0b6da2059246c4b506ab60" +checksum = "a1f72d3e19488cf7d8ea52d2fc0f8754fc933398b337cd3cbdb28aaeb35159ef" dependencies = [ "console", "lazy_static", @@ -1764,9 +1770,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb94a0ffd3f3ee755c20f7d8752f45cac88605a4dcf808abcff72873296ec7b" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1794,15 +1800,15 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -2141,9 +2147,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2255,9 +2261,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2342,7 +2348,7 @@ dependencies = [ [[package]] name = "proto_core" -version = "0.43.0" +version = "0.43.3" dependencies = [ "clap", "convert_case", @@ -2390,7 +2396,7 @@ dependencies = [ [[package]] name = "proto_pdk" -version = "0.25.0" +version = "0.25.2" dependencies = [ "extism-pdk", "proto_pdk_api", @@ -2401,7 +2407,7 @@ dependencies = [ [[package]] name = "proto_pdk_api" -version = "0.24.0" +version = "0.24.2" dependencies = [ "proto_pdk_api", "rustc-hash 2.0.0", @@ -2417,7 +2423,7 @@ dependencies = [ [[package]] name = "proto_pdk_test_utils" -version = "0.30.0" +version = "0.30.3" dependencies = [ "proto_core", "proto_pdk_api", @@ -2481,10 +2487,11 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -2586,9 +2593,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2630,9 +2637,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -2738,9 +2745,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags", "errno", @@ -2753,9 +2760,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "log", "once_cell", @@ -2803,9 +2810,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2820,9 +2827,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2841,9 +2848,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.0" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836f1e0f4963ef5288b539b643b35e043e76a32d0f4e47e67febf69576527f50" +checksum = "d8d25269dd3a12467afe2e510f69fb0b46b698e5afb296b59f2145259deaf8e8" dependencies = [ "sdd", ] @@ -2925,9 +2932,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdd" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a7b59a5d9b0099720b417b6325d91a52cbf5b3dcb5041d864be53eefa58abc" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" [[package]] name = "security-framework" @@ -2963,18 +2970,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", @@ -2983,9 +2990,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "indexmap", "itoa", @@ -3337,9 +3344,9 @@ checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -3473,18 +3480,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", @@ -3518,9 +3525,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -3795,9 +3802,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -3895,7 +3902,7 @@ dependencies = [ [[package]] name = "warpgate_pdk" -version = "0.8.0" +version = "0.8.1" dependencies = [ "extism-pdk", "serde", @@ -3936,9 +3943,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef073ced962d62984fb38a36e5fdc1a2b23c9e0e1fa0689bb97afa4202ef6887" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3947,9 +3954,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4bfab14ef75323f4eb75fa52ee0a3fb59611977fd3240da19b2cf36ff85030e" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -3962,9 +3969,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.44" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65471f79c1022ffa5291d33520cbbb53b7687b01c2f8e83b57d102eed7ed479d" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3974,9 +3981,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7bec9830f60924d9ceb3ef99d55c155be8afa76954edffbb5936ff4509474e7" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3984,9 +3991,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c74f6e152a76a2ad448e223b0fc0b6b5747649c3d769cc6bf45737bf97d0ed6" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -3997,9 +4004,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42f6c679374623f295a8623adfe63d9284091245c3504bde47c17a3ce2777d9" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-encoder" @@ -4022,9 +4029,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -4372,9 +4379,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44188d185b5bdcae1052d08bcbcf9091a5524038d4572cc4f4f2bb9d5554ddd9" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 12ffa530d..e9f063745 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,29 +4,29 @@ members = ["crates/*"] default-members = ["crates/cli"] [workspace.dependencies] -anyhow = "1.0.89" +anyhow = "1.0.91" async-trait = "0.1.83" clap = "4.5.20" -clap_complete = "4.5.33" +clap_complete = "4.5.36" dirs = "5.0.1" extism = ">=1.6.0" # Lower for consumers -extism-pdk = "1.2.1" +extism-pdk = "1.3.0" human-sort = "0.2.2" indexmap = "2.6.0" miette = "7.2.0" once_cell = "1.20.2" -regex = { version = "1.11.0", default-features = false, features = ["std"] } -reqwest = { version = "0.12.8", default-features = false, features = [ +regex = { version = "1.11.1", default-features = false, features = ["std"] } +reqwest = { version = "0.12.9", default-features = false, features = [ "charset", "http2", "macos-system-configuration", ] } rustc-hash = "2.0.0" -scc = "2.2.0" +scc = "2.2.4" schematic = { version = "0.17.5", default-features = false } semver = { version = "1.0.23", features = ["serde"] } -serde = { version = "1.0.210", features = ["derive"] } -serde_json = "1.0.128" +serde = { version = "1.0.214", features = ["derive"] } +serde_json = "1.0.132" sha2 = "0.10.8" shell-words = "1.1.0" starbase = { version = "0.9.2" } @@ -50,10 +50,10 @@ starbase_utils = { version = "0.8.10", default-features = false, features = [ "net", "toml", ] } -thiserror = "1.0.64" -tokio = { version = "1.40.0", features = ["full", "tracing"] } +thiserror = "1.0.65" +tokio = { version = "1.41.0", features = ["full", "tracing"] } tracing = "0.1.40" -uuid = { version = "1.10.0", features = ["v4"] } +uuid = { version = "1.11.0", features = ["v4"] } # Config for 'cargo dist' [workspace.metadata.dist] diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 10a3aaa83..087935be9 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -32,9 +32,9 @@ name = "proto-shim" path = "src/main_shim.rs" [dependencies] -proto_core = { version = "0.43.0", path = "../core", features = ["clap"] } +proto_core = { version = "0.43.3", path = "../core", features = ["clap"] } proto_installer = { version = "0.7.1", path = "../installer" } -proto_pdk_api = { version = "0.24.0", path = "../pdk-api" } +proto_pdk_api = { version = "0.24.2", path = "../pdk-api" } proto_shim = { version = "0.5.0", path = "../shim" } system_env = { version = "0.6.1", path = "../system-env" } anyhow = { workspace = true } @@ -67,11 +67,11 @@ rust_json = "0.1.5" sigpipe = "0.1.3" # For extism/wastime -extism = "1.7.0" +extism = "1.8.0" regalloc2 = "=0.9.3" -wasmtime = "23.0.2" -wasi-common = "23.0.2" -wiggle = "23.0.2" +wasmtime = "~23.0.3" +wasi-common = "~23.0.3" +wiggle = "~23.0.3" [dev-dependencies] starbase_sandbox = { workspace = true } diff --git a/crates/cli/src/commands/install.rs b/crates/cli/src/commands/install.rs index 72da7a677..65bb2d3ab 100644 --- a/crates/cli/src/commands/install.rs +++ b/crates/cli/src/commands/install.rs @@ -7,7 +7,7 @@ use clap::Args; use indicatif::ProgressBar; use miette::IntoDiagnostic; use proto_core::flow::install::{InstallOptions, InstallPhase}; -use proto_core::{Id, PinType, Tool, UnresolvedVersionSpec, VersionSpec}; +use proto_core::{Id, PinType, Tool, UnresolvedVersionSpec, VersionSpec, PROTO_PLUGIN_KEY}; use proto_pdk_api::{InstallHook, SyncShellProfileInput, SyncShellProfileOutput}; use starbase::AppResult; use starbase_shell::ShellType; @@ -80,6 +80,11 @@ async fn pin_version( initial_version: &UnresolvedVersionSpec, arg_pin_type: &Option, ) -> miette::Result { + // Don't pin the proto tool itself as it's internal only + if tool.id.as_str() == PROTO_PLUGIN_KEY { + return Ok(false); + } + let config = tool.proto.load_config()?; let spec = tool.get_resolved_version().to_unresolved_spec(); let mut pin_type = PinType::Local; diff --git a/crates/cli/src/commands/plugin/info.rs b/crates/cli/src/commands/plugin/info.rs index 2491f3ae0..b3d403ec8 100644 --- a/crates/cli/src/commands/plugin/info.rs +++ b/crates/cli/src/commands/plugin/info.rs @@ -81,7 +81,7 @@ pub async fn info(session: ProtoSession, args: InfoPluginArgs) -> AppResult { printer.named_section("Plugin", |p| { if let Some(version) = &tool.metadata.plugin_version { - p.entry("Version", color::hash(version)); + p.entry("Version", color::hash(version.to_string())); } if let Some(locator) = &tool.locator { diff --git a/crates/cli/tests/snapshots/plugins_test__plugins__builtins__supports_python.snap b/crates/cli/tests/snapshots/plugins_test__plugins__builtins__supports_python.snap index 882027dd8..792678aae 100644 --- a/crates/cli/tests/snapshots/plugins_test__plugins__builtins__supports_python.snap +++ b/crates/cli/tests/snapshots/plugins_test__plugins__builtins__supports_python.snap @@ -10,16 +10,5 @@ expression: "fs::read_to_string(sandbox.path().join(\".proto/shims/registry.json "pip" ] }, - "pip3": { - "parent": "python", - "before_args": [ - "-m", - "pip" - ] - }, - "python": {}, - "python3": { - "alt_bin": true, - "parent": "python" - } + "python": {} } diff --git a/crates/codegen/Cargo.toml b/crates/codegen/Cargo.toml index a725df035..9ce502215 100644 --- a/crates/codegen/Cargo.toml +++ b/crates/codegen/Cargo.toml @@ -9,8 +9,8 @@ publish = false dist = false [dependencies] -proto_core = { version = "0.43.0", path = "../core" } -proto_pdk_api = { version = "0.24.0", path = "../pdk-api", features = [ +proto_core = { version = "0.43.3", path = "../core" } +proto_pdk_api = { version = "0.24.2", path = "../pdk-api", features = [ "schematic", ] } schematic = { workspace = true, features = [ diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 410d90ca5..2e309a6ab 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "proto_core" -version = "0.43.0" +version = "0.43.3" edition = "2021" license = "MIT" description = "Core proto APIs." @@ -8,7 +8,7 @@ homepage = "https://moonrepo.dev/proto" repository = "https://github.com/moonrepo/proto" [dependencies] -proto_pdk_api = { version = "0.24.0", path = "../pdk-api", features = [ +proto_pdk_api = { version = "0.24.2", path = "../pdk-api", features = [ "schematic", ] } proto_shim = { version = "0.5.0", path = "../shim" } diff --git a/crates/core/src/error.rs b/crates/core/src/error.rs index face43a0a..15664709e 100644 --- a/crates/core/src/error.rs +++ b/crates/core/src/error.rs @@ -53,6 +53,20 @@ pub enum ProtoError { download: PathBuf, }, + #[diagnostic(code(proto::minimum_version_requirement))] + #[error( + "Unable to use the {tool} plugin with identifier {}, as it requires a minimum proto version of {}, but found {} instead.", + .id.style(Style::Id), + .expected.style(Style::Hash), + .actual.style(Style::Hash) + )] + InvalidMinimumVersion { + tool: String, + id: Id, + expected: String, + actual: String, + }, + #[diagnostic(code(proto::env::home_dir))] #[error("Unable to determine your home directory.")] MissingHomeDir, diff --git a/crates/core/src/flow/link.rs b/crates/core/src/flow/link.rs index d8c55d998..783a5c781 100644 --- a/crates/core/src/flow/link.rs +++ b/crates/core/src/flow/link.rs @@ -123,10 +123,7 @@ impl Tool { }; // Create a new product since we need to change the version for each bin - let tool_dir = self - .inventory - .create_product(&VersionSpec::Semantic(SemVer(bin_version))) - .dir; + let tool_dir = self.inventory.create_product(&bin_version).dir; let input_path = tool_dir.join( bin.config diff --git a/crates/core/src/flow/locate.rs b/crates/core/src/flow/locate.rs index 8698f4736..e7754d3ea 100644 --- a/crates/core/src/flow/locate.rs +++ b/crates/core/src/flow/locate.rs @@ -4,12 +4,12 @@ use crate::layout::BinManager; use crate::tool::Tool; use proto_pdk_api::{ExecutableConfig, LocateExecutablesInput, LocateExecutablesOutput}; use proto_shim::{get_exe_file_name, get_shim_file_name}; -use semver::Version; use serde::Serialize; use starbase_utils::fs; use std::env; use std::path::{Path, PathBuf}; use tracing::{debug, instrument}; +use version_spec::VersionSpec; // Executable = File within the tool's install directory // Binary/shim = File within proto's store directories @@ -21,7 +21,7 @@ pub struct ExecutableLocation { pub path: PathBuf, #[serde(skip_serializing_if = "Option::is_none")] - pub version: Option, + pub version: Option, } impl Tool { @@ -159,7 +159,7 @@ impl Tool { .join(get_exe_file_name(&versioned_name)), name: versioned_name, config: config.clone(), - version: resolved_version.as_version().map(|v| v.to_owned()), + version: Some((*resolved_version).to_owned()), }); } } diff --git a/crates/core/src/flow/resolve.rs b/crates/core/src/flow/resolve.rs index aff7cd288..05bfebfe3 100644 --- a/crates/core/src/flow/resolve.rs +++ b/crates/core/src/flow/resolve.rs @@ -227,6 +227,7 @@ impl Tool { ParseVersionFileInput { content, file: file.clone(), + path: self.to_virtual_path(&file_path), }, ) .await?; diff --git a/crates/core/src/proto_config.rs b/crates/core/src/proto_config.rs index 4af05ecc9..a3cff8a18 100644 --- a/crates/core/src/proto_config.rs +++ b/crates/core/src/proto_config.rs @@ -283,7 +283,7 @@ impl ProtoConfig { pub fn builtin_proto_plugin(&self) -> PluginLocator { PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/proto_tool-v0.2.0/proto_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/proto_tool-v0.3.0/proto_tool.wasm".into() })) } @@ -297,7 +297,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("bun"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/bun_tool-v0.13.0/bun_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/bun_tool-v0.14.0/bun_tool.wasm".into() })) ); } @@ -306,7 +306,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("deno"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/deno_tool-v0.12.0/deno_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/deno_tool-v0.13.0/deno_tool.wasm".into() })) ); } @@ -315,7 +315,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("go"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/go_tool-v0.13.0/go_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/go_tool-v0.14.0/go_tool.wasm".into() })) ); } @@ -324,7 +324,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("node"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/node_tool-v0.12.2/node_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/node_tool-v0.13.0/node_tool.wasm".into() })) ); } @@ -334,7 +334,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw(depman), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/node_depman_tool-v0.13.1/node_depman_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/node_depman_tool-v0.14.0/node_depman_tool.wasm".into() })) ); } @@ -344,7 +344,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("python"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/python_tool-v0.11.0/python_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/python_tool-v0.12.0/python_tool.wasm".into() })) ); } @@ -353,7 +353,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw("rust"), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/rust_tool-v0.11.0/rust_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/rust_tool-v0.12.0/rust_tool.wasm".into() })) ); } @@ -362,7 +362,7 @@ impl ProtoConfig { self.plugins.insert( Id::raw(SCHEMA_PLUGIN_KEY), PluginLocator::Url(Box::new(UrlLocator { - url: "https://github.com/moonrepo/tools/releases/download/schema_tool-v0.15.1/schema_tool.wasm".into() + url: "https://github.com/moonrepo/tools/releases/download/schema_tool-v0.16.0/schema_tool.wasm".into() })) ); } diff --git a/crates/core/src/tool.rs b/crates/core/src/tool.rs index 2b471df2f..f2af76887 100644 --- a/crates/core/src/tool.rs +++ b/crates/core/src/tool.rs @@ -209,6 +209,29 @@ impl Tool { ) .await?; + #[cfg(not(debug_assertions))] + if let Some(expected_version) = &metadata.minimum_proto_version { + use miette::IntoDiagnostic; + + let actual_version = Version::parse( + std::env::var("PROTO_VERSION") + .ok() + .as_ref() + .unwrap_or_else(|_| env!("CARGO_PKG_VERSION")), + ) + .into_diagnostic()?; + + if &actual_version < expected_version { + return Err(ProtoError::InvalidMinimumVersion { + tool: metadata.name, + id: self.id.clone(), + expected: expected_version.to_string(), + actual: actual_version.to_string(), + } + .into()); + } + } + let mut inventory = self .proto .store diff --git a/crates/pdk-api/Cargo.toml b/crates/pdk-api/Cargo.toml index 7f7261404..4936f41dd 100644 --- a/crates/pdk-api/Cargo.toml +++ b/crates/pdk-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "proto_pdk_api" -version = "0.24.0" +version = "0.24.2" edition = "2021" license = "MIT" description = "Core APIs for creating proto WASM plugins." diff --git a/crates/pdk-api/src/api/mod.rs b/crates/pdk-api/src/api/mod.rs index 3325996bc..92b7ec7c7 100644 --- a/crates/pdk-api/src/api/mod.rs +++ b/crates/pdk-api/src/api/mod.rs @@ -81,12 +81,16 @@ api_struct!( #[serde(default)] pub inventory: ToolInventoryMetadata, + /// Minimum version of proto required to execute this plugin. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub minimum_proto_version: Option, + /// Human readable name of the tool. pub name: String, /// Version of the plugin. #[serde(default, skip_serializing_if = "Option::is_none")] - pub plugin_version: Option, + pub plugin_version: Option, /// Names of commands that will self-upgrade the tool, /// and should be blocked from happening. @@ -123,6 +127,9 @@ api_struct!( /// Name of file that's being parsed. pub file: String, + + /// Virtual path to the file being parsed. + pub path: VirtualPath, } ); diff --git a/crates/pdk-test-utils/Cargo.toml b/crates/pdk-test-utils/Cargo.toml index a51681722..d19a888f9 100644 --- a/crates/pdk-test-utils/Cargo.toml +++ b/crates/pdk-test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "proto_pdk_test_utils" -version = "0.30.0" +version = "0.30.3" edition = "2021" license = "MIT" description = "Utilities for testing proto WASM plugins." @@ -8,9 +8,10 @@ homepage = "https://moonrepo.dev/proto" repository = "https://github.com/moonrepo/proto" [dependencies] -proto_core = { version = "0.43.0", path = "../core" } -proto_pdk_api = { version = "0.24.0", path = "../pdk-api" } +proto_core = { version = "0.43.3", path = "../core" } +proto_pdk_api = { version = "0.24.2", path = "../pdk-api" } warpgate = { version = "0.19.0", path = "../warpgate" } +# extism = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } starbase_sandbox = { workspace = true } diff --git a/crates/pdk-test-utils/src/macros.rs b/crates/pdk-test-utils/src/macros.rs index b759a6fa1..62ee9a3e1 100644 --- a/crates/pdk-test-utils/src/macros.rs +++ b/crates/pdk-test-utils/src/macros.rs @@ -198,7 +198,7 @@ macro_rules! generate_resolve_versions_tests { #[macro_export] macro_rules! generate_shims_test { ($id:literal) => { - generate_shims_test!($id, []); + generate_shims_test!($id, [$id]); }; ($id:literal, [ $($bin:literal),* ]) => { generate_shims_test!($id, [ $($bin),* ], None); @@ -215,14 +215,6 @@ macro_rules! generate_shims_test { plugin.tool.generate_shims(false).await.unwrap(); - assert!( - sandbox.proto_dir.join("shims").join(if cfg!(windows) { - format!("{}.exe", $id) - } else { - $id.to_string() - }).exists() - ); - $( assert!( sandbox.proto_dir.join("shims").join(if cfg!(windows) { diff --git a/crates/pdk-test-utils/src/sandbox.rs b/crates/pdk-test-utils/src/sandbox.rs index 7244b9454..0f2bb2e28 100644 --- a/crates/pdk-test-utils/src/sandbox.rs +++ b/crates/pdk-test-utils/src/sandbox.rs @@ -64,7 +64,8 @@ impl ProtoWasmSandbox { mut op: impl FnMut(&mut ConfigBuilder), ) -> WasmTestWrapper { let id = Id::new(id).unwrap(); - let proto = ProtoEnvironment::new_testing(&self.root).unwrap(); + let mut proto = ProtoEnvironment::new_testing(&self.root).unwrap(); + proto.cwd = self.root.clone(); // Create manifest let mut manifest = diff --git a/crates/pdk-test-utils/src/wrapper.rs b/crates/pdk-test-utils/src/wrapper.rs index dc68dad39..bdcb736e6 100644 --- a/crates/pdk-test-utils/src/wrapper.rs +++ b/crates/pdk-test-utils/src/wrapper.rs @@ -1,6 +1,7 @@ use proto_core::Tool; use proto_pdk_api::*; +#[derive(Debug)] pub struct WasmTestWrapper { pub tool: Tool, } @@ -68,7 +69,12 @@ impl WasmTestWrapper { .unwrap() } - pub async fn parse_version_file(&self, input: ParseVersionFileInput) -> ParseVersionFileOutput { + pub async fn parse_version_file( + &self, + mut input: ParseVersionFileInput, + ) -> ParseVersionFileOutput { + input.path = self.tool.to_virtual_path(&input.path); + self.tool .plugin .call_func_with("parse_version_file", input) diff --git a/crates/pdk/Cargo.toml b/crates/pdk/Cargo.toml index 094364f55..3c1211828 100644 --- a/crates/pdk/Cargo.toml +++ b/crates/pdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "proto_pdk" -version = "0.25.0" +version = "0.25.2" edition = "2021" license = "MIT" description = "A plugin development kit for creating proto WASM plugins." @@ -8,8 +8,8 @@ homepage = "https://moonrepo.dev/proto" repository = "https://github.com/moonrepo/proto" [dependencies] -proto_pdk_api = { version = "0.24.0", path = "../pdk-api" } -warpgate_pdk = { version = "0.8.0", path = "../warpgate-pdk" } +proto_pdk_api = { version = "0.24.2", path = "../pdk-api" } +warpgate_pdk = { version = "0.8.1", path = "../warpgate-pdk" } extism-pdk = { workspace = true } rustc-hash = { workspace = true } serde = { workspace = true } diff --git a/crates/warpgate-pdk/Cargo.toml b/crates/warpgate-pdk/Cargo.toml index a9e5c3550..a61862690 100644 --- a/crates/warpgate-pdk/Cargo.toml +++ b/crates/warpgate-pdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "warpgate_pdk" -version = "0.8.0" +version = "0.8.1" edition = "2021" license = "MIT" description = "Reusable WASM macros and functions for plugin developer kits." diff --git a/crates/warpgate-pdk/src/macros.rs b/crates/warpgate-pdk/src/macros.rs index b213eb575..7d44d23ca 100644 --- a/crates/warpgate-pdk/src/macros.rs +++ b/crates/warpgate-pdk/src/macros.rs @@ -14,7 +14,10 @@ macro_rules! plugin_err { #[macro_export] macro_rules! exec_command { (input, $input:expr) => { - unsafe { exec_command(Json($input))?.0 } + { + #[allow(clippy::macro_metavars_in_unsafe)] + unsafe { exec_command(Json($input))?.0 } + } }; // Raw result diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bdb353e00..1a07338aa 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] profile = "default" -channel = "1.81.0" +channel = "1.82.0"