From b3f137aa8b9632c54c4017775dd8c3d0195a0859 Mon Sep 17 00:00:00 2001 From: Alex Hansen Date: Tue, 27 Aug 2024 08:56:53 -0700 Subject: [PATCH] update miette to v7.2.0 (#1889) Closes #1887 Thanks @billti for finding the new `fancy-no-syscall` feature [introduced to `miette` in February](https://github.com/zkat/miette/pull/349). As a result of that change, we can now update to the latest version of `miette` without breaking our WASM builds. Yay! --- Cargo.lock | 100 +++-------------------------- Cargo.toml | 2 +- compiler/qsc/Cargo.toml | 2 +- compiler/qsc_frontend/src/error.rs | 2 +- pip/Cargo.toml | 2 +- resource_estimator/Cargo.toml | 2 +- 6 files changed, 14 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5486cc2842..d55768cbd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,15 +135,6 @@ 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 = "bitflags" version = "2.6.0" @@ -555,12 +546,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "is_ci" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -683,20 +668,13 @@ dependencies = [ [[package]] name = "miette" -version = "5.10.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ - "backtrace", - "backtrace-ext", - "is-terminal", + "cfg-if", "miette-derive", - "once_cell", "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", "textwrap", "thiserror", "unicode-width", @@ -704,9 +682,9 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.10.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", @@ -851,9 +829,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" [[package]] name = "parking_lot" @@ -1663,34 +1641,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "supports-color" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" -dependencies = [ - "is-terminal", - "is_ci", -] - -[[package]] -name = "supports-hyperlinks" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" -dependencies = [ - "is-terminal", -] - -[[package]] -name = "supports-unicode" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" -dependencies = [ - "is-terminal", -] - [[package]] name = "syn" version = "2.0.75" @@ -1708,21 +1658,11 @@ version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "textwrap" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", @@ -1920,22 +1860,6 @@ dependencies = [ "safe_arch", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -1945,12 +1869,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index 432b48ebd0..a3cc5bbc65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ indoc = "2.0" js-sys = "0.3" libfuzzer-sys = "0.4" log = "0.4" -miette = "5" +miette = { version = "7.2", features = ["fancy-no-syscall"] } thiserror = "1.0" nalgebra = { version = "0.33" } num-bigint = "0.4" diff --git a/compiler/qsc/Cargo.toml b/compiler/qsc/Cargo.toml index 2ac3c7b98e..99aabfed1b 100644 --- a/compiler/qsc/Cargo.toml +++ b/compiler/qsc/Cargo.toml @@ -13,7 +13,7 @@ license.workspace = true clap = { workspace = true, features = ["derive", "cargo"] } env_logger = { workspace = true } log = { workspace = true } -miette = { workspace = true, features = ["fancy"] } +miette = { workspace = true, features = ["fancy-no-syscall"] } num-bigint = { workspace = true } num-complex = { workspace = true } qsc_codegen = { path = "../qsc_codegen" } diff --git a/compiler/qsc_frontend/src/error.rs b/compiler/qsc_frontend/src/error.rs index c533b63722..81e54a28a0 100644 --- a/compiler/qsc_frontend/src/error.rs +++ b/compiler/qsc_frontend/src/error.rs @@ -155,5 +155,5 @@ impl SourceCode for WithSource { } fn with_offset(span: &SourceSpan, f: impl FnOnce(usize) -> usize) -> SourceSpan { - SourceSpan::new(f(span.offset()).into(), span.len().into()) + SourceSpan::new(f(span.offset()).into(), span.len()) } diff --git a/pip/Cargo.toml b/pip/Cargo.toml index 2f5859915e..5a200ee815 100644 --- a/pip/Cargo.toml +++ b/pip/Cargo.toml @@ -15,7 +15,7 @@ num-bigint = { workspace = true } num-complex = { workspace = true } qsc = { path = "../compiler/qsc" } resource_estimator = { path = "../resource_estimator" } -miette = { workspace = true, features = ["fancy"] } +miette = { workspace = true, features = ["fancy-no-syscall"] } rustc-hash = { workspace = true } serde_json = { workspace = true } diff --git a/resource_estimator/Cargo.toml b/resource_estimator/Cargo.toml index 34355e11e3..64d31da5aa 100644 --- a/resource_estimator/Cargo.toml +++ b/resource_estimator/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] qsc = { path = "../compiler/qsc" } thiserror = { workspace = true } -miette = { workspace = true, features = ["fancy"] } +miette = { workspace = true, features = ["fancy-no-syscall"] } num-bigint = { workspace = true } num-complex = { workspace = true } rand = { workspace = true }