Skip to content

Commit

Permalink
Better error output, and verusfmt before rustfmt
Browse files Browse the repository at this point in the history
Details:
* run verusfmt formatting before doing rustfmt; this allows us to give
  more precise error locations in case of parse failures; the two
  formatters should otherwise not interact with each other anyways, so
  the choice of which one first was not particularly an important
  decision anyways
* switch from `anyhow` to `miette` to enable nicer outputs
* start reporting the file name for the parse failure
* produce nicer error output along with context lines
  • Loading branch information
jaybosamiya committed Dec 29, 2023
1 parent 592b644 commit 933f72b
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 30 deletions.
197 changes: 186 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ edition = "2021"
autoexamples = false

[dependencies]
anyhow = "1.0.71"
clap = { version = "4.3.11", features = ["derive"] }
fs-err = "2.9.0"
insta = "1.30.0"
itertools = "0.11.0"
miette = { version = "5.10.0", features = ["fancy"] }
pest = "2.0"
pest_derive = "2.0"
pretty = "0.12.1"
regex = "1.9.6"
similar = "2.2.1"
thiserror = "1.0.52"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17" }

Expand Down
Loading

0 comments on commit 933f72b

Please sign in to comment.