From 50a8a3f38ec7a6175e12d38e9e806ebb3ae8829d Mon Sep 17 00:00:00 2001 From: Rain Date: Thu, 26 Dec 2024 00:14:26 +0000 Subject: [PATCH] [target-spec-miette] expose fixtures as an optional feature This is really useful for testing in downstream crates. --- .github/workflows/ci.yml | 18 ++++++------- Cargo.lock | 3 +++ Cargo.toml | 8 ++++-- Justfile | 4 +++ target-spec-miette/Cargo.toml | 13 ++++++--- target-spec-miette/README.md | 5 ++++ target-spec-miette/src/fixtures.rs | 27 +++++++++++++++++++ target-spec-miette/src/lib.rs | 7 +++++ .../tests/datatest-snapshot/custom.rs | 5 +--- .../tests/datatest-snapshot/expr.rs | 4 +-- .../tests/datatest-snapshot/main.rs | 4 +-- .../invalid-arch.json-display.snap | 0 .../invalid-endian.json-display.snap | 0 .../invalid-family.json-display.snap | 0 ...lid-target-pointer-width.json-display.snap | 0 .../missing-arch.json-display.snap | 0 .../syntax-error.json-display.snap | 0 .../multiline-output-display.snap | 0 .../unclosed-delimiter-display.snap | 0 .../{output => }/unquoted-value-display.snap | 0 .../custom-invalid}/invalid-arch.json | 0 .../custom-invalid}/invalid-endian.json | 0 .../custom-invalid}/invalid-family.json | 0 .../invalid-target-pointer-width.json | 0 .../custom-invalid}/missing-arch.json | 0 .../custom-invalid}/syntax-error.json | 0 .../expr-invalid}/multiline-output | 0 .../expr-invalid}/unclosed-delimiter | 0 .../expr-invalid}/unquoted-value | 0 workspace-hack/Cargo.toml | 1 + 30 files changed, 76 insertions(+), 23 deletions(-) create mode 100644 target-spec-miette/src/fixtures.rs rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/invalid-arch.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/invalid-endian.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/invalid-family.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/invalid-target-pointer-width.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/missing-arch.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/{output => }/syntax-error.json-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/{output => }/multiline-output-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/{output => }/unclosed-delimiter-display.snap (100%) rename target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/{output => }/unquoted-value-display.snap (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/invalid-arch.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/invalid-endian.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/invalid-family.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/invalid-target-pointer-width.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/missing-arch.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/custom-invalid/input => fixtures/custom-invalid}/syntax-error.json (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/expr-invalid/input => fixtures/expr-invalid}/multiline-output (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/expr-invalid/input => fixtures/expr-invalid}/unclosed-delimiter (100%) rename target-spec-miette/tests/{datatest-snapshot/snapshots/expr-invalid/input => fixtures/expr-invalid}/unquoted-value (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df475259549..7f51b95fde3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,8 @@ jobs: run: git diff --exit-code # cargo hack might cause changes to Cargo.lock which can cause the git diff above to fail. Put # this at the end. - - name: Clippy feature powerset for target-spec - run: cargo hack --feature-powerset --package target-spec clippy + - name: target-spec-powerset clippy + run: just target-spec-powerset clippy build: name: Build and test core crates @@ -57,6 +57,10 @@ jobs: with: toolchain: ${{ matrix.rust-version }} - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2 + - name: Install tools + uses: taiki-e/install-action@8484225d9734e230a8bf38421a4ffec1cc249372 # v2.46.20 + with: + tool: cargo-hack,just,nextest # Build all packages we care about one by one to ensure feature unification # doesn't happen. @@ -71,14 +75,10 @@ jobs: run: cargo build --all-targets --package determinator - name: Build hakari run: cargo build --all-targets --package hakari - - name: Install latest nextest release - uses: taiki-e/install-action@nextest - name: Run tests for core crates run: cargo nextest run --package target-spec --package guppy-summaries --package guppy --package determinator --package hakari - - name: Install cargo-hack - uses: taiki-e/install-action@cargo-hack - - name: Check feature powerset for target-spec - run: cargo hack --feature-powerset --package target-spec nextest run + - name: target-spec-powerset nextest run + run: just target-spec-powerset nextest run build-all-features: name: Build and test (all features) @@ -98,7 +98,7 @@ jobs: - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2 - name: Build # Build all targets to ensure examples are built as well. - # Exclude cargo-compare so that it only runs on the cfg-expr version below. + # Exclude cargo-compare: it runs as part of test-extended below. run: cargo test --no-run --all-targets --all-features --workspace --exclude cargo-compare - name: Run doctests run: cargo test --doc --all-features --workspace --exclude cargo-compare diff --git a/Cargo.lock b/Cargo.lock index a924bc32fbc..0d89082af6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1013,6 +1013,7 @@ checksum = "c5bb15663f97601af4c8d17237f2f884593bf59b4c013003babcb3cae66711b7" dependencies = [ "camino", "fancy-regex", + "include_dir", "libtest-mimic", "walkdir", ] @@ -2338,6 +2339,7 @@ dependencies = [ "clap_builder", "console", "getrandom", + "include_dir", "indexmap 1.9.3", "libc", "log", @@ -4017,6 +4019,7 @@ version = "0.4.2" dependencies = [ "datatest-stable", "guppy-workspace-hack", + "include_dir", "insta", "miette", "target-spec", diff --git a/Cargo.toml b/Cargo.toml index e75d9888e63..07bcc3c8e34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,8 +21,9 @@ members = [ [workspace.dependencies] ahash = "0.8.11" cfg-expr = "0.17.2" -datatest-stable = "0.3.0" +datatest-stable = { version = "0.3.0", features = ["include-dir"] } guppy-workspace-hack = "0.1.0" +include_dir = "0.7.4" insta = "1.41.1" miette = "7.4.0" @@ -32,7 +33,10 @@ miette = "7.4.0" rust-version = "1.78" [workspace.lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)', 'cfg(guppy_nightly)'] } +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(doc_cfg)', + 'cfg(guppy_nightly)', +] } [patch.crates-io.guppy-workspace-hack] path = "workspace-hack" diff --git a/Justfile b/Justfile index 62d124c3a79..0542d727773 100644 --- a/Justfile +++ b/Justfile @@ -12,6 +12,10 @@ nightly arg1 *args: bootstrap arg1 *args: RUSTC_BOOTSTRAP=1 cargo {{arg1}} {{args}} --all-features --all-targets --config .cargo/nightly-config.toml +# Run `cargo hack --feature-powerset` on target-spec crates +target-spec-powerset *args: + cargo hack --feature-powerset -p target-spec -p target-spec-miette {{args}} + # Build docs for crates and direct dependencies rustdoc: @# Ignore clap since we currently depend on both clap 2, 3, and 4 -- we diff --git a/target-spec-miette/Cargo.toml b/target-spec-miette/Cargo.toml index c81a188b7f7..7b2a110e0a9 100644 --- a/target-spec-miette/Cargo.toml +++ b/target-spec-miette/Cargo.toml @@ -16,15 +16,18 @@ all-features = true rustdoc-args = ["--cfg=doc_cfg"] [dependencies] -target-spec = { version = "3.3.1", path = "../target-spec" } -miette.workspace = true guppy-workspace-hack.workspace = true +include_dir = { workspace = true, optional = true } +miette.workspace = true +target-spec = { version = "3.3.1", path = "../target-spec" } [dev-dependencies] datatest-stable.workspace = true insta.workspace = true miette = { workspace = true, features = ["fancy"] } -target-spec = { version = "3.3.1", path = "../target-spec", features = ["custom"] } +target-spec = { version = "3.3.1", path = "../target-spec", features = [ + "custom", +] } [lints] workspace = true @@ -32,3 +35,7 @@ workspace = true [[test]] name = "datatest-snapshot" harness = false +required-features = ["fixtures"] + +[features] +fixtures = ["dep:include_dir"] diff --git a/target-spec-miette/README.md b/target-spec-miette/README.md index 4f391404d05..afc8c24ba52 100644 --- a/target-spec-miette/README.md +++ b/target-spec-miette/README.md @@ -12,6 +12,11 @@ Integrate [target-spec](https://crates.io/crates/target-spec) errors with [miett This crate has implementations of `Diagnostic` for the various kinds of errors that target-spec produces. This can be used to pretty-print errors returned by target-spec. +### Features + +- `fixtures`: Include [a set of fixtures](crate::fixtures) for testing + downstream users against. This feature is disabled by default. + ### Minimum supported Rust version The minimum supported Rust version (MSRV) is **Rust 1.78**. diff --git a/target-spec-miette/src/fixtures.rs b/target-spec-miette/src/fixtures.rs new file mode 100644 index 00000000000..9005c2698d0 --- /dev/null +++ b/target-spec-miette/src/fixtures.rs @@ -0,0 +1,27 @@ +// Copyright (c) The cargo-guppy Contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 + +//! Fixtures for target-spec-miette. +//! +//! This module contains test fixtures for the target-spec-miette crate, +//! typically around testing invalid inputs of various kinds. +//! +//! These fixtures can be used in downstream crates to verify that bad inputs +//! are gracefully handled, particularly by showing good error messages. (Good +//! error messages are part of why this library exists in the first place). +//! +//! The target-spec-miette library itself uses them via the +//! [`datatest-stable`](https://docs.rs/datatest-stable) crate. +//! +//! The exact contents of each directory are not part of the semver guarantees, +//! so using this module is only recommended in tests, and with a checked-in +//! `Cargo.lock`. A minor update to target-spec-miette may require that your +//! tests also be updated. + +/// A set of invalid custom target JSON specifications. +pub static CUSTOM_INVALID: include_dir::Dir<'static> = + include_dir::include_dir!("target-spec-miette/tests/fixtures/custom-invalid"); + +/// A set of invalid `cfg` expressions. +pub static EXPR_INVALID: include_dir::Dir<'static> = + include_dir::include_dir!("target-spec-miette/tests/fixtures/expr-invalid"); diff --git a/target-spec-miette/src/lib.rs b/target-spec-miette/src/lib.rs index d3cd97f518b..90427383fcf 100644 --- a/target-spec-miette/src/lib.rs +++ b/target-spec-miette/src/lib.rs @@ -6,6 +6,11 @@ //! This crate has implementations of `Diagnostic` for the various kinds of errors that target-spec //! produces. This can be used to pretty-print errors returned by target-spec. //! +//! ## Features +//! +//! - `fixtures`: Include [a set of fixtures](crate::fixtures) for testing +//! downstream users against. This feature is disabled by default. +//! //! ## Minimum supported Rust version //! //! The minimum supported Rust version (MSRV) is **Rust 1.78**. @@ -17,6 +22,8 @@ #![forbid(unsafe_code)] #![cfg_attr(doc_cfg, feature(doc_cfg, doc_auto_cfg))] +#[cfg(feature = "fixtures")] +pub mod fixtures; mod imp; pub use imp::*; diff --git a/target-spec-miette/tests/datatest-snapshot/custom.rs b/target-spec-miette/tests/datatest-snapshot/custom.rs index fb630b21997..341037cbd85 100644 --- a/target-spec-miette/tests/datatest-snapshot/custom.rs +++ b/target-spec-miette/tests/datatest-snapshot/custom.rs @@ -11,12 +11,9 @@ use datatest_stable::Utf8Path; use target_spec::TargetFeatures; use target_spec_miette::IntoMietteDiagnostic; -pub(crate) const CUSTOM_INVALID_PATH: &str = - "tests/datatest-snapshot/snapshots/custom-invalid/input"; - pub(crate) fn custom_invalid(path: &Utf8Path, contents: String) -> datatest_stable::Result<()> { let (_guard, insta_prefix) = - bind_insta_settings(path, "../datatest-snapshot/snapshots/custom-invalid/output"); + bind_insta_settings(path, "../datatest-snapshot/snapshots/custom-invalid"); let error = target_spec::Platform::new_custom("my-target", &contents, TargetFeatures::none()) .expect_err("expected input to fail"); diff --git a/target-spec-miette/tests/datatest-snapshot/expr.rs b/target-spec-miette/tests/datatest-snapshot/expr.rs index c5617e90533..19c5ac1009e 100644 --- a/target-spec-miette/tests/datatest-snapshot/expr.rs +++ b/target-spec-miette/tests/datatest-snapshot/expr.rs @@ -5,11 +5,9 @@ use crate::helpers::bind_insta_settings; use datatest_stable::Utf8Path; use target_spec_miette::IntoMietteDiagnostic; -pub(crate) const EXPR_INVALID_PATH: &str = "tests/datatest-snapshot/snapshots/expr-invalid/input"; - pub(crate) fn expr_invalid(path: &Utf8Path, contents: String) -> datatest_stable::Result<()> { let (_guard, insta_prefix) = - bind_insta_settings(path, "../datatest-snapshot/snapshots/expr-invalid/output"); + bind_insta_settings(path, "../datatest-snapshot/snapshots/expr-invalid"); let error = target_spec::TargetSpec::new(contents.trim_end().to_owned()) .expect_err("expected input to fail"); diff --git a/target-spec-miette/tests/datatest-snapshot/main.rs b/target-spec-miette/tests/datatest-snapshot/main.rs index e2c7750853a..76e6dda3de4 100644 --- a/target-spec-miette/tests/datatest-snapshot/main.rs +++ b/target-spec-miette/tests/datatest-snapshot/main.rs @@ -6,6 +6,6 @@ mod expr; mod helpers; datatest_stable::harness! { - { test = custom::custom_invalid, root = custom::CUSTOM_INVALID_PATH, pattern = r"^.*/*" }, - { test = expr::expr_invalid, root = expr::EXPR_INVALID_PATH, pattern = r"^.*/*" }, + { test = custom::custom_invalid, root = &target_spec_miette::fixtures::CUSTOM_INVALID, pattern = r"^.*/*" }, + { test = expr::expr_invalid, root = &target_spec_miette::fixtures::EXPR_INVALID, pattern = r"^.*/*" }, } diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-arch.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-arch.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-endian.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-endian.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-family.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-family.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-target-pointer-width.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/invalid-target-pointer-width.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/missing-arch.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/missing-arch.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/syntax-error.json-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/output/syntax-error.json-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/multiline-output-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/multiline-output-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/multiline-output-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/unclosed-delimiter-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/unclosed-delimiter-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unclosed-delimiter-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/unquoted-value-display.snap b/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/output/unquoted-value-display.snap rename to target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/unquoted-value-display.snap diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-arch.json b/target-spec-miette/tests/fixtures/custom-invalid/invalid-arch.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-arch.json rename to target-spec-miette/tests/fixtures/custom-invalid/invalid-arch.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-endian.json b/target-spec-miette/tests/fixtures/custom-invalid/invalid-endian.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-endian.json rename to target-spec-miette/tests/fixtures/custom-invalid/invalid-endian.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-family.json b/target-spec-miette/tests/fixtures/custom-invalid/invalid-family.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-family.json rename to target-spec-miette/tests/fixtures/custom-invalid/invalid-family.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-target-pointer-width.json b/target-spec-miette/tests/fixtures/custom-invalid/invalid-target-pointer-width.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/invalid-target-pointer-width.json rename to target-spec-miette/tests/fixtures/custom-invalid/invalid-target-pointer-width.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/missing-arch.json b/target-spec-miette/tests/fixtures/custom-invalid/missing-arch.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/missing-arch.json rename to target-spec-miette/tests/fixtures/custom-invalid/missing-arch.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/syntax-error.json b/target-spec-miette/tests/fixtures/custom-invalid/syntax-error.json similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/custom-invalid/input/syntax-error.json rename to target-spec-miette/tests/fixtures/custom-invalid/syntax-error.json diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/multiline-output b/target-spec-miette/tests/fixtures/expr-invalid/multiline-output similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/multiline-output rename to target-spec-miette/tests/fixtures/expr-invalid/multiline-output diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/unclosed-delimiter b/target-spec-miette/tests/fixtures/expr-invalid/unclosed-delimiter similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/unclosed-delimiter rename to target-spec-miette/tests/fixtures/expr-invalid/unclosed-delimiter diff --git a/target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/unquoted-value b/target-spec-miette/tests/fixtures/expr-invalid/unquoted-value similarity index 100% rename from target-spec-miette/tests/datatest-snapshot/snapshots/expr-invalid/input/unquoted-value rename to target-spec-miette/tests/fixtures/expr-invalid/unquoted-value diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index ce9cf2a68d9..b5cf3008a45 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -24,6 +24,7 @@ clap = { version = "4.5.22", features = ["derive"] } clap_builder = { version = "4.5.22", default-features = false, features = ["color", "help", "std", "suggestions", "usage"] } console = { version = "0.15.8" } getrandom = { version = "0.2.12", default-features = false, features = ["std"] } +include_dir = { version = "0.7.4", features = ["glob"] } indexmap = { version = "1.9.3", default-features = false, features = ["std"] } log = { version = "0.4.22", default-features = false, features = ["std"] } miette = { version = "7.4.0", features = ["fancy"] }