Skip to content

Commit 42b4d91

Browse files
committed
(momo) Updated to RON with error locations
1 parent a2aef7a commit 42b4d91

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ with
8888
```
8989
Here, `args..` is a configuration string in [RON](https://github.com/ron-rs/ron) format, which can also directly be read from a configuration file:
9090
```shell
91-
> rustcoalescence <SUBCOMMAND> $(<config.ron)
91+
> rustcoalescence <SUBCOMMAND> "$(<config.ron)"
9292
```
9393
Please refer to [docs/simulate.ron](docs/simulate.ron) and [docs/replay.ron](docs/replay.ron) for a detailed description of all configuration options. [./simulate.ron](simulate.ron) and [./replay.ron](replay.ron) also provide example configurations.
9494

rustcoalescence/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ structopt = "0.3"
3232
anyhow = "1.0"
3333
contracts = { git = "https://gitlab.com/MomoLangenstein/contracts", rev = "3a44375a" }
3434
serde = { version = "1.0", features = ["derive"] }
35-
ron = { git = "https://github.com/ron-rs/ron.git", rev = "521e639" }
35+
ron = { git = "https://github.com/MomoLangenstein/ron.git", rev = "6ce56de", features = ["integer128"] }
3636
log = { version = "0.4", features = ["std"] }
3737
colored = "2.0"
3838
thiserror = "1.0"

rustcoalescence/src/args/parse.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,16 @@ pub fn try_parse<'de, D: Deserialize<'de>>(subcommand: &str, ron_args: &'de str)
6060
Ok(args) => Ok(args),
6161
Err(err) => {
6262
let path = track.path();
63+
let err = de_ron.error(err);
6364

6465
Err(anyhow::anyhow!(
65-
"{}{}{}{}: {}",
66+
"{}{}{}{} @ ({}):\n{}",
6667
subcommand,
6768
if path.iter().count() >= 1 { "." } else { "" },
6869
path,
6970
if path.iter().count() >= 1 { "" } else { "*" },
70-
err,
71+
err.position,
72+
err.code,
7173
))
7274
},
7375
}

0 commit comments

Comments
 (0)