error-stack 0.2.1

A context-aware error-handling library that supports arbitrary attached user data
Documentation
extend = { path = "../../../.github/scripts/rust/Makefile.toml" }

[env]
CARGO_CLIPPY_HACK_FLAGS = "--workspace --optional-deps --feature-powerset --exclude-features default"
CARGO_TEST_HACK_FLAGS = "--workspace --optional-deps --feature-powerset --exclude-features default"
CARGO_INSTA_TEST_FLAGS = "--no-fail-fast"
CARGO_RUSTDOC_HACK_FLAGS = ""
CARGO_DOC_HACK_FLAGS = ""
# The only features that are of relevance are: spantrace, pretty-print, std
# all others do not change the output
CARGO_INSTA_TEST_HACK_FLAGS = "--keep-going --feature-powerset --include-features spantrace,pretty-print,std"


[tasks.test]
dependencies = ["install-rust-src"]

# Required for UI tests
[tasks.install-rust-src]
private = true
install_crate = { rustup_component_name = "rust-src" }


[tasks.rustdoc]
workspace = true
run_task = [
    { name = ["rustdoc-task"], condition = { env_true = ["CARGO_MAKE_CRATE_IS_WORKSPACE"] } },
    { name = ["rustdoc-task-subcrate"] },
]

[tasks.rustdoc-task-subcrate]
env = { CARGO_RUSTDOC_FLAGS = "--all-features -- -Z unstable-options" }
run_task = { name = ["rustdoc-task"] }

[tasks.doc]
workspace = true
run_task = [
    { name = ["doc-task"], condition = { env_true = ["CARGO_MAKE_CRATE_IS_WORKSPACE"] } },
    { name = ["doc-task-subcrate"] },
]

[tasks.doc-task-subcrate]
env = { CARGO_DOC_FLAGS = "--all-features" }
run_task = { name = ["doc-task"] }

# Snapshot Tests
# ==============
#
# Several features make use of snapshots for acceptance/integration tests, these are files
# with expected output for a specific input.
# We use insta for tests https://github.com/mitsuhiko/insta and expect-test https://docs.rs/expect-test/latest/expect_test/ for doc tests.
# expect-test enables us to directly include the snapshot in documentation, while insta provides a more complete feature-set.
#
# You should invoke this task whenever you change `test_debug`, a file which includes a doctest with `expect_test`, or change the formatting of a `Report`.
#
# Reviewing Tests
# ---------------
#
# To review snapshots generated by insta install `cargo-insta` (https://github.com/mitsuhiko/insta) and invoke `cargo insta review`,
# you will be led through all changes one-by-one and need to compare them to see if they are what you expected the outcome to be.
#
# To review snapshots generated by expect-test use gits diffing capabilities.
[tasks.update-snapshots]
category = "Test"
description = "Test against insta to update snapshots"
run_task = { name = ['update-snapshots-task'] }

[tasks.update-snapshots-task]
private = true
run_task = { name = ['update-snapshots-task-lib', 'update-snapshots-task-doc'] }

[tasks.update-snapshots-task-lib]
extend = "cargo"
args = ["hack", "@@split(CARGO_INSTA_TEST_HACK_FLAGS, )", "nextest", "run", "--cargo-profile", "${CARGO_MAKE_CARGO_PROFILE}", "@@split(CARGO_TEST_FLAGS, )", "@@split(CARGO_INSTA_TEST_FLAGS, )", "${@}"]
env = { "INSTA_FORCE_PASS" = "1", "RUST_BACKTRACE" = "1", "INSTA_UPDATE" = "new" }

[tasks.update-snapshots-task-doc]
# only run on nightly, as backtraces are otherwise not included
condition = { channels = ["nightly"] }
extend = "cargo"
args = ["test", "--profile", "${CARGO_MAKE_CARGO_PROFILE}", "@@split(CARGO_DOC_TEST_FLAGS, )", "--doc", "${@}"]
env = { "UPDATE_EXPECT" = "1", "RUST_BACKTRACE" = "1" }