Commit Graph

115 Commits

Author SHA1 Message Date
Kat Marchán a18a6444d9
chore: Release 2024-02-15 18:18:45 -08:00
Nahor 03060245d8
feat(collection): add support for collection of labels (#341)
Fixes: https://github.com/zkat/miette/issues/315

Allow errors to have a number of labels determined at runtime.
An example of this is when the rust compiler labels all the arms of
a `match` expression when one of them has an incompatible type

To allow customization of the text for each label in a collection, add
support for using LabeledSpan in collections instead of just regular
spans
2024-02-15 18:14:04 -08:00
Brooks Rady 6e829f8c0c
fix(tests): revert test-breaking changes of e5c7ae4 (#339)
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.

* fix(ci): move from minimal-versions to direct-minimal-versions
2024-02-07 10:17:42 -08:00
Kat Marchán ecb01022f0
chore: Release 2024-02-04 17:59:20 -08:00
Kat Marchán a4011d174c
feat(deps): bump dependencies
Fixes: https://github.com/zkat/miette/issues/336

BREAKING CHANGE: This bumps owo-colors to 4.0, which is a breaking change because we expose its styles as part of the graphical renderer API
2024-02-04 17:26:25 -08:00
Kat Marchán cf2d8c0b2c
chore: Release 2024-02-03 20:27:47 -08:00
Kat Marchán 5d4b262f7b
chore: Release 2024-02-03 20:01:50 -08:00
Gavrilikhin Daniil 88d00e0e20
feat(derive): Allow optional sources in derive (#301)
Fixes: https://github.com/zkat/miette/issues/217
2023-10-20 20:50:15 -07:00
Will Crichton db0b7e403a
feat(labels): Add support for primary label in specifying line/col information (#291) 2023-09-20 15:36:33 -07:00
Bruce Mitchener cc81382a60
fix(misc): Improve ci and fix clippy (#290)
* ci: Update actions, replace actions-rs.

* `actions/checkout` is updated from `v1` to the current `v4`.
* `actions-rs/toolchain` is replaced by `dtolnay/rust-toolchain` as
  the `actions-rs` actions haven't been maintained in a long time.

* clippy: Remove unnecessary call to `into_iter`.

The parameter takes `IntoIterator`, so we don't have to call
`into_iter` at the call site.

* clippy: Remove explicit lifetime that can be elided.

* clippy: tests: Fix useless conversion warnings.

* clippy: tests: Remove call to `format!`.

* Fix minimal-versions build.

Due to changes in the nightly compiler, using a recent nightly
requires proc-macro2 1.0.60 or later:

https://github.com/dtolnay/proc-macro2/issues/356

* ci: Use is-terminal 0.4.7 for MSRV builds.

is-terminal 0.4.8 updated its MSRV to 1.63, so we can't use it
with our MSRV of 1.56. Force usage of the older version which has
an older MSRV.
2023-09-20 10:37:40 -07:00
Kat Marchán f4d056e1ff
chore: Release 2023-07-15 18:49:14 -07:00
Kat Marchán 91e5f5b7e3
chore: Release 2023-05-18 15:58:11 -07:00
Kat Marchán 2b4d67d7cd
chore: Release 2023-04-18 08:56:10 -07:00
Kat Marchán 80c6ce805b
chore: Release 2023-03-31 17:25:26 -07:00
jtroo a215720576
feat(deps): update to syn2 (#247)
Fixes: https://github.com/zkat/miette/issues/243
2023-03-29 18:11:14 -07:00
Kat Marchán 78fe18e699
chore: Release 2023-03-13 21:15:55 -07:00
Kat Marchán 128c0a1fae
(cargo-release) start next development iteration 5.5.1-alpha.0 2022-11-23 16:56:52 -08:00
Kat Marchán 694c7de942
(cargo-release) version 5.5.0 2022-11-23 16:56:03 -08:00
Daniel Rivas c88f0b5aa0
fix(derive): elide lifetimes in derived functions (#226) 2022-11-21 09:51:10 -08:00
Kat Marchán e5171e6054
(cargo-release) start next development iteration 5.4.2-alpha.0 2022-10-28 16:21:52 -07:00
Kat Marchán fc68191efa
(cargo-release) version 5.4.1 2022-10-28 16:21:11 -07:00
Kat Marchán 4ac7cb2d9a
(cargo-release) start next development iteration 5.4.1-alpha.0 2022-10-28 16:16:26 -07:00
Kat Marchán 283a9af2c5
(cargo-release) version 5.4.0 2022-10-28 16:15:26 -07:00
Kat Marchán a8d03f536e
(cargo-release) start next development iteration 5.3.2-alpha.0 2022-09-10 14:26:59 -07:00
Kat Marchán 1c7981f5e9
(cargo-release) version 5.3.1 2022-09-10 14:26:12 -07:00
Kat Marchán 6712cd6339
(cargo-release) start next development iteration 5.3.1-alpha.0 2022-08-09 17:41:58 -07:00
Kat Marchán faf090939c
(cargo-release) version 5.3.0 2022-08-09 17:41:14 -07:00
Kat Marchán 0c164dd695
(cargo-release) start next development iteration 5.2.1-alpha.0 2022-08-01 09:49:53 -07:00
Kat Marchán 2765a52d7f
(cargo-release) version 5.2.0 2022-08-01 09:48:55 -07:00
Kat Marchán 0c76591193
(cargo-release) start next development iteration 5.1.2-alpha.0 2022-07-08 19:44:43 -07:00
Kat Marchán 9f04a79606
(cargo-release) version 5.1.1 2022-07-08 19:43:52 -07:00
Kat Marchán 5fbce68515
(cargo-release) start next development iteration 5.1.1-alpha.0 2022-06-25 11:00:54 -07:00
Kat Marchán 7409b08544
(cargo-release) version 5.1.0 2022-06-25 11:00:09 -07:00
Kat Marchán c011beb065
(cargo-release) start next development iteration 5.0.1-alpha.0 2022-06-24 08:38:18 -07:00
Kat Marchán d4fd910a4a
(cargo-release) version 5.0.0 2022-06-24 08:37:21 -07:00
Kat Marchán e9b5bf71ff
(cargo-release) start next development iteration 4.7.2-alpha.0 2022-05-14 21:36:17 -07:00
Kat Marchán 63bebfa6c7
(cargo-release) version 4.7.1 2022-05-14 21:35:37 -07:00
Marcel Müller f783a0e2ae
Allow using smartpointers with source_diagnostic (#169)
* Add more tests for diagnostic_source

* Use Borrow::borrow instead of AsRef

AsRef is not reflexive, meaning that it is not implemented as &T for all
T. Borrow is though, so we use that to make sure that we always get a
reference that is correct, even in the presence of smart pointers.
2022-05-13 08:19:05 -07:00
Kat Marchán e251638adb
(cargo-release) start next development iteration 4.7.1-alpha.0 2022-05-05 08:59:47 -07:00
Kat Marchán ba7b58cb40
(cargo-release) version 4.7.0 2022-05-05 08:59:04 -07:00
Matthias Beyer bc449c8426
feat(diagnostic_source): add protocol method for Diagnostic-aware source chaining (#165)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-05-05 08:32:37 -07:00
Kat Marchán 22de435406
(cargo-release) start next development iteration 4.6.1-alpha.0 2022-04-22 19:34:19 -07:00
Kat Marchán f338860584
(cargo-release) version 4.6.0 2022-04-22 19:33:38 -07:00
Kat Marchán bffb18ab11
(cargo-release) start next development iteration 4.5.1-alpha.0 2022-04-17 22:54:19 -07:00
Kat Marchán 5b457ed4fe
(cargo-release) version 4.5.0 2022-04-17 22:53:38 -07:00
Kat Marchán 9da62cd05d feat(label): use macro magic instead of optional flag for optional labels 2022-04-17 22:43:01 -07:00
Kat Marchán ea55f458fa feat(help): allow non-option values in #[help] fields 2022-04-17 22:43:01 -07:00
Kat Marchán 23ee3642d1
feat(labels): allow optional labels in derive macro (#153)
Fixes: https://github.com/zkat/miette/issues/110
2022-04-17 19:41:10 -07:00
Kat Marchán 45093c2f58
feat(help): update macro to allow optional help text (#152)
Fixes: https://github.com/zkat/miette/issues/148
2022-04-17 18:19:28 -07:00
Kat Marchán 86cdf4796f
(cargo-release) start next development iteration 4.4.1-alpha.0 2022-04-12 11:42:36 -07:00