From 30d0cffa4294b27da88253b5fb24b40044310338 Mon Sep 17 00:00:00 2001 From: har7an <99636919+har7an@users.noreply.github.com> Date: Tue, 9 May 2023 02:43:28 +0000 Subject: [PATCH] Use rust 1.67 (#2375) * rust: Update toolchain version to 1.67 * xtask/pipeline/publish: Drop manual "wait" for crates.io to catch up, which is obsolete with rust 1.66 and up. Cargo does that on its own now. See https://github.com/rust-lang/cargo/pull/11062 * xtask: Add function to obtain asset_dir instead of assembling it on demand throughout the codebase. * xtask/run: Add '--quick-run' flag as a convenient shorthand for `cargo xtask run --data-dir $PROJECT_ROOT/zellij-utils/assets`. * cargo: Add 'q' command alias as a shorthand for 'cargo xtask run --quick-run' * cargo: Update thiserror to 1.0.40 * cargo: Update anyhow to 1.0.70 and specify dependency only once inside `zellij-utils`, not inside the zellij root crate. * cargo: Update names to 0.14.0 * cargo: Update miette to 5.7.0 and re-export the dependency from zellij-utils, to avoid duplicate (incompatible) includes from inside zellij-utils and the root crate. * cargo: Update dialoguer to 0.10.4 * fix formatting * changelog: Add PR #2375 --- .cargo/config.toml | 1 + CHANGELOG.md | 1 + Cargo.lock | 385 ++++++++++++++++++++++++++++++---------- Cargo.toml | 10 +- rust-toolchain.toml | 2 +- src/commands.rs | 2 +- src/sessions.rs | 1 + xtask/src/build.rs | 4 +- xtask/src/ci.rs | 5 +- xtask/src/flags.rs | 3 + xtask/src/main.rs | 4 + xtask/src/pipelines.rs | 20 ++- zellij-utils/Cargo.toml | 4 +- zellij-utils/src/lib.rs | 4 +- 14 files changed, 323 insertions(+), 123 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 87b1763d54..9b113f5d56 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,4 +3,5 @@ parallel-compiler = true [alias] xtask = "run --package xtask --" x = "xtask" +q = "x run --quick-run" make = "xtask deprecated" diff --git a/CHANGELOG.md b/CHANGELOG.md index 09ff04fd95..a3f7104ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * fix: error loading non-existant themes directory (https://github.com/zellij-org/zellij/pull/2411) * build: speed up build and ci https://github.com/zellij-org/zellij/pull/2396 * fix: sticky bit FreeBSD crash https://github.com/zellij-org/zellij/pull/2424 +* build: Bump rust toolchain version to 1.67 (https://github.com/zellij-org/zellij/pull/2375) ## [0.36.0] - 2023-04-13 * fix: when moving pane focus off screen edge to the next tab, the pane on the screen edge is now focused (https://github.com/zellij-org/zellij/pull/2293) diff --git a/Cargo.lock b/Cargo.lock index 55f2bca7de..74374912a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" dependencies = [ "backtrace", ] @@ -200,7 +200,7 @@ checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -215,7 +215,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -241,6 +241,15 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "backtrace-ext" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" +dependencies = [ + "backtrace", +] + [[package]] name = "base-x" version = "0.2.11" @@ -345,7 +354,7 @@ checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -411,7 +420,7 @@ dependencies = [ "once_cell", "strsim", "termcolor", - "textwrap 0.15.0", + "textwrap", ] [[package]] @@ -433,7 +442,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -695,7 +704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -728,7 +737,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -739,7 +748,7 @@ checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -756,7 +765,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -863,7 +872,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -906,7 +915,7 @@ checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -927,7 +936,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -939,6 +948,27 @@ dependencies = [ "serde", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "event-listener" version = "2.5.2" @@ -1108,7 +1138,7 @@ checksum = "76c813ffb63e8fd3df6f1ac3cc1ea392c7612ac2de4d0b44dcbfe03e5c4bf94a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -1176,6 +1206,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -1281,6 +1317,29 @@ dependencies = [ "ghost", ] +[[package]] +name = "io-lifetimes" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "is-terminal" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "is_ci" version = "1.1.1" @@ -1308,7 +1367,7 @@ version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8388a371e0e2ede18bbd94e476fcd45b4ac65cefcedf0c06fd13bd8389574a6" dependencies = [ - "miette 5.3.0", + "miette", "nom 7.1.1", "thiserror", ] @@ -1394,6 +1453,12 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +[[package]] +name = "linux-raw-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" + [[package]] name = "lock_api" version = "0.4.7" @@ -1465,7 +1530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" dependencies = [ "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -1521,55 +1586,34 @@ dependencies = [ [[package]] name = "miette" -version = "3.3.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2adcfcced5d625bf90a958a82ae5b93231f57f3df1383fee28c9b5096d35ed" +checksum = "92a992891d5579caa9efd8e601f82e30a1caa79a27a5db075dde30ecb9eab357" dependencies = [ - "atty", "backtrace", - "miette-derive 3.3.0", + "backtrace-ext", + "is-terminal", + "miette-derive", "once_cell", "owo-colors", "supports-color", "supports-hyperlinks", "supports-unicode", "terminal_size", - "textwrap 0.14.2", - "thiserror", -] - -[[package]] -name = "miette" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28d6092d7e94a90bb9ea8e6c26c99d5d112d49dda2afdb4f7ea8cf09e1a5a6d" -dependencies = [ - "miette-derive 5.3.0", - "once_cell", + "textwrap", "thiserror", "unicode-width", ] [[package]] name = "miette-derive" -version = "3.3.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c01a8b61312d367ce87956bb686731f87e4c6dd5dbc550e8f06e3c24fb1f67f" +checksum = "4c65c625186a9bcce6699394bee511e1b1aec689aa7e3be1bf4e996e75834153" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "miette-derive" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2485ed7d1fe80704928e3eb86387439609bd0c6bb96db8208daa364cfd1e09" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -1617,9 +1661,9 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ "rand 0.8.5", ] @@ -1686,7 +1730,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -1714,7 +1758,7 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", ] @@ -1886,7 +1930,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -1968,7 +2012,7 @@ dependencies = [ "phf_shared 0.11.1", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -2054,7 +2098,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.96", "version_check", ] @@ -2077,9 +2121,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -2101,14 +2145,14 @@ checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] name = "quote" -version = "1.0.18" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -2318,7 +2362,7 @@ checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -2373,6 +2417,20 @@ dependencies = [ "semver 1.0.17", ] +[[package]] +name = "rustix" +version = "0.37.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", +] + [[package]] name = "rustversion" version = "1.0.9" @@ -2472,7 +2530,7 @@ checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -2711,7 +2769,7 @@ dependencies = [ "quote", "serde", "serde_derive", - "syn", + "syn 1.0.96", ] [[package]] @@ -2727,7 +2785,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn", + "syn 1.0.96", ] [[package]] @@ -2775,7 +2833,7 @@ dependencies = [ "heck 0.3.3", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -2790,30 +2848,30 @@ dependencies = [ [[package]] name = "supports-color" -version = "1.3.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9" +checksum = "4950e7174bffabe99455511c39707310e7e9b440364a2fcb1cc21521be57b354" dependencies = [ - "atty", + "is-terminal", "is_ci", ] [[package]] name = "supports-hyperlinks" -version = "1.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" +checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" dependencies = [ - "atty", + "is-terminal", ] [[package]] name = "supports-unicode" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" +checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" dependencies = [ - "atty", + "is-terminal", ] [[package]] @@ -2827,6 +2885,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sysinfo" version = "0.22.5" @@ -2957,39 +3026,33 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" dependencies = [ "smawk", "unicode-linebreak", "unicode-width", ] -[[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -3049,7 +3112,7 @@ dependencies = [ "proc-macro2", "quote", "standback", - "syn", + "syn 1.0.96", ] [[package]] @@ -3103,7 +3166,7 @@ checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -3151,7 +3214,7 @@ checksum = "e60147782cc30833c05fba3bab1d9b5771b2685a2557672ac96fa5d154099c0e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -3347,7 +3410,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.96", "wasm-bindgen-shared", ] @@ -3381,7 +3444,7 @@ checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3508,7 +3571,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -3782,7 +3845,7 @@ checksum = "0c9f5ef318442d07b3d071f9f43ea40b80992f87faee14bb4d017b6991c307f0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.96", ] [[package]] @@ -3853,6 +3916,66 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.33.0" @@ -3865,6 +3988,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.33.0" @@ -3877,6 +4012,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.33.0" @@ -3889,6 +4036,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.33.0" @@ -3901,6 +4060,30 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.33.0" @@ -3913,6 +4096,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "xflags" version = "0.3.1" @@ -3968,11 +4163,9 @@ dependencies = [ name = "zellij" version = "0.37.0" dependencies = [ - "anyhow", "dialoguer", "insta", "log", - "miette 3.3.0", "names", "rand 0.8.5", "regex", @@ -4067,7 +4260,7 @@ dependencies = [ "libc", "log", "log4rs", - "miette 3.3.0", + "miette", "nix 0.23.1", "once_cell", "percent-encoding", diff --git a/Cargo.toml b/Cargo.toml index f73af05a18..1c16269f29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,16 +13,14 @@ rust-version = "1.60" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0" -thiserror = "1.0.30" -names = { version = "0.13.0", default-features = false } -miette = { version = "3.3.0", features = ["fancy"] } zellij-client = { path = "zellij-client/", version = "0.37.0" } zellij-server = { path = "zellij-server/", version = "0.37.0" } zellij-utils = { path = "zellij-utils/", version = "0.37.0" } +thiserror = "1.0.40" +names = { version = "0.14.0", default-features = false } log = "0.4.17" -dialoguer = "0.10.1" -suggest = "0.4" +dialoguer = "0.10.4" +suggest = "0.4.0" [dev-dependencies] insta = { version = "1.6.0", features = ["backtrace"] } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9684a220e3..6f03903d38 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ # This file is updated by `update-toolchain.sh` [toolchain] -channel = "1.63.0" +channel = "1.67.0" components = ["rustfmt", "clippy", "rust-analysis"] targets = ["wasm32-wasi", "x86_64-unknown-linux-musl"] diff --git a/src/commands.rs b/src/commands.rs index 0394a93428..697f7057f7 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,5 +1,4 @@ use dialoguer::Confirm; -use miette::{Report, Result}; use std::{fs::File, io::prelude::*, path::PathBuf, process}; use crate::sessions::{ @@ -23,6 +22,7 @@ use zellij_utils::{ config::{Config, ConfigError}, options::Options, }, + miette::{Report, Result}, nix, setup::Setup, }; diff --git a/src/sessions.rs b/src/sessions.rs index 5f3354de9c..9c7de37e9f 100644 --- a/src/sessions.rs +++ b/src/sessions.rs @@ -3,6 +3,7 @@ use std::time::SystemTime; use std::{fs, io, process}; use suggest::Suggest; use zellij_utils::{ + anyhow, consts::ZELLIJ_SOCK_DIR, envs, interprocess::local_socket::LocalSocketStream, diff --git a/xtask/src/build.rs b/xtask/src/build.rs index 5bdf6ec884..b77eda40db 100644 --- a/xtask/src/build.rs +++ b/xtask/src/build.rs @@ -69,9 +69,7 @@ fn move_plugin_to_assets(sh: &Shell, plugin_name: &str) -> anyhow::Result<()> { let err_context = || format!("failed to move plugin '{plugin_name}' to assets folder"); // Get asset path - let asset_name = crate::project_root() - .join("zellij-utils") - .join("assets") + let asset_name = crate::asset_dir() .join("plugins") .join(plugin_name) .with_extension("wasm"); diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index b756052a9e..e34f517ea0 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -54,11 +54,8 @@ fn e2e_build(sh: &Shell) -> anyhow::Result<()> { .context(err_context)?; // Copy plugins to e2e data-dir + let plugin_dir = crate::asset_dir().join("plugins"); let project_root = crate::project_root(); - let plugin_dir = project_root - .join("zellij-utils") - .join("assets") - .join("plugins"); let data_dir = project_root.join("target").join("e2e-data"); let plugins: Vec<_> = std::fs::read_dir(plugin_dir) .context(err_context)? diff --git a/xtask/src/flags.rs b/xtask/src/flags.rs index 75ef19e4d9..dd076f5397 100644 --- a/xtask/src/flags.rs +++ b/xtask/src/flags.rs @@ -65,6 +65,8 @@ xflags::xflags! { /// Run debug version of zellij cmd run { + /// Take plugins from asset folder, skip building plugins. + optional --quick-run /// Take plugins from here, skip building plugins. Passed to zellij verbatim optional --data-dir path: PathBuf /// Enable the singlepass compiler for WASM plugins @@ -182,6 +184,7 @@ pub struct Install { pub struct Run { pub args: Vec, + pub quick_run: bool, pub data_dir: Option, pub singlepass: bool, pub disable_deps_optimize: bool, diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 9759d3a64a..e394f84316 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -82,6 +82,10 @@ fn project_root() -> PathBuf { .to_path_buf() } +fn asset_dir() -> PathBuf { + crate::project_root().join("zellij-utils").join("assets") +} + pub fn cargo() -> anyhow::Result { std::env::var_os("CARGO") .map_or_else(|| which::which("cargo"), |exe| Ok(PathBuf::from(exe))) diff --git a/xtask/src/pipelines.rs b/xtask/src/pipelines.rs index b89d7c0b67..9c82c6c0a0 100644 --- a/xtask/src/pipelines.rs +++ b/xtask/src/pipelines.rs @@ -90,10 +90,18 @@ pub fn install(sh: &Shell, flags: flags::Install) -> anyhow::Result<()> { } /// Run zellij debug build. -pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { - let err_context = || format!("failed to run pipeline 'run' with args {flags:?}"); +pub fn run(sh: &Shell, mut flags: flags::Run) -> anyhow::Result<()> { + let err_context = + |flags: &flags::Run| format!("failed to run pipeline 'run' with args {:?}", flags); let singlepass = flags.singlepass.then_some(["--features", "singlepass"]); + if flags.quick_run { + if flags.data_dir.is_some() { + eprintln!("cannot use '--data-dir' and '--quick-run' at the same time!"); + std::process::exit(1); + } + flags.data_dir.replace(crate::asset_dir()); + } let profile = if flags.disable_deps_optimize { "dev" @@ -117,7 +125,7 @@ pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { .run() .map_err(anyhow::Error::new) }) - .with_context(err_context) + .with_context(|| err_context(&flags)) } else { build::build( sh, @@ -137,7 +145,7 @@ pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { .run() .map_err(anyhow::Error::new) }) - .with_context(err_context) + .with_context(|| err_context(&flags)) } } @@ -357,10 +365,6 @@ pub fn publish(sh: &Shell, flags: flags::Publish) -> anyhow::Result<()> { println!("Aborting publish for crate '{crate_name}'"); return Err::<(), _>(err); } - } else { - println!("Waiting for crates.io to catch up..."); - std::thread::sleep(std::time::Duration::from_secs(15)); - break; } } } diff --git a/zellij-utils/Cargo.toml b/zellij-utils/Cargo.toml index 6c29f1e435..95f8b82aad 100644 --- a/zellij-utils/Cargo.toml +++ b/zellij-utils/Cargo.toml @@ -10,7 +10,7 @@ include = ["src/**/*", "assets/"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = { version = "1.0.45", features = ["backtrace"] } +anyhow = { version = "1.0.70", features = ["backtrace"] } backtrace = "0.3.55" rmp-serde = "1.1.0" clap = { version = "3.2.2", features = ["derive", "env"] } @@ -34,7 +34,7 @@ url = { version = "2.2.2", features = ["serde"] } vte = { version = "0.11.0", default-features = false } log = "0.4.17" unicode-width = "0.1.8" -miette = { version = "3.3.0", features = ["fancy"] } +miette = { version = "5.7.0", features = ["fancy"] } regex = "1.5.5" tempfile = "3.2.0" kdl = { version = "4.5.0", features = ["span"] } diff --git a/zellij-utils/src/lib.rs b/zellij-utils/src/lib.rs index 892dcbc15e..2ee248060e 100644 --- a/zellij-utils/src/lib.rs +++ b/zellij-utils/src/lib.rs @@ -20,6 +20,6 @@ pub mod logging; // Requires log4rs #[cfg(not(target_family = "wasm"))] pub use ::{ - anyhow, async_std, clap, interprocess, lazy_static, libc, nix, regex, serde, signal_hook, - tempfile, termwiz, vte, + anyhow, async_std, clap, interprocess, lazy_static, libc, miette, nix, regex, serde, + signal_hook, tempfile, termwiz, vte, };