From 612af7892966305fa538b99ee838bd6ee1b3b2aa Mon Sep 17 00:00:00 2001 From: Brooks J Rady Date: Tue, 6 Feb 2024 21:04:57 -0800 Subject: [PATCH 1/2] fix(tests): revert test-breaking changes of e5c7ae4 The commit e5c7ae4 seemed to (potentially erronously?) remove a number of spaces following the left `|` bar of some graphical report handler tests. That change had no effect on the `syntax_highlighter_on_real_file()` test, presumably because the trailing whitespace is removed by `strip_ansi_escapes::strip_str()`, but it did break the `triple_adjacent_highlight()` and `non_adjacent_hightlight()` tests. Restoring the spaces removed in e5c7ae4 fixes the failing tests on main. --- tests/graphical.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/graphical.rs b/tests/graphical.rs index 7e5de785..b5fa4d8b 100644 --- a/tests/graphical.rs +++ b/tests/graphical.rs @@ -1864,11 +1864,11 @@ fn syntax_highlighter_on_real_file() { let expected = format!( r#" × This is an error ╭─[{filename}:{l2}:{CO}] - {l1} │ + {l1} │ {l2} │ let (filename, line) = (file!(), line!() as usize); · ─────────────┬───────────── · ╰── this is a label - {l3} │ + {l3} │ ╰──── "#, l1 = line - 1, @@ -1911,13 +1911,13 @@ fn triple_adjacent_highlight() -> Result<(), MietteError> { 1 │ source · ───┬── · ╰── this bit here - 2 │ - 3 │ + 2 │ + 3 │ 4 │ text · ──┬─ · ╰── also this bit - 5 │ - 6 │ + 5 │ + 6 │ 7 │ here · ──┬─ · ╰── finally we got @@ -1957,10 +1957,10 @@ fn non_adjacent_highlight() -> Result<(), MietteError> { 1 │ source · ───┬── · ╰── this bit here - 2 │ + 2 │ ╰──── ╭─[bad_file.rs:5:3] - 4 │ + 4 │ 5 │ text here · ──┬─ · ╰── also this bit From be0fe5f1d77140e0ca4642186a7ce1bd10ae8bb7 Mon Sep 17 00:00:00 2001 From: Brooks J Rady Date: Tue, 6 Feb 2024 22:07:07 -0800 Subject: [PATCH 2/2] fix(ci): move from minimal-versions to direct-minimal-versions --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- miette-derive/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5f437ed..b1eef7da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,4 +79,4 @@ jobs: with: toolchain: nightly - name: Run minimal version build - run: cargo build -Z minimal-versions --features fancy,no-format-args-capture + run: cargo build -Z direct-minimal-versions --features fancy,no-format-args-capture diff --git a/Cargo.toml b/Cargo.toml index 4ffe9b87..0fa16855 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ futures = { version = "0.3", default-features = false } indenter = "0.3.3" rustversion = "1.0" trybuild = { version = "1.0.89", features = ["diff"] } -syn = { version = "2.0", features = ["full"] } +syn = { version = "2.0.48", features = ["full"] } regex = "1.10" lazy_static = "1.4" diff --git a/miette-derive/Cargo.toml b/miette-derive/Cargo.toml index 822f754e..c1e4eb26 100644 --- a/miette-derive/Cargo.toml +++ b/miette-derive/Cargo.toml @@ -12,5 +12,5 @@ proc-macro = true [dependencies] proc-macro2 = "1.0.78" -quote = "1.0" +quote = "1.0.35" syn = "2.0.48"