aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cargo_watch/Cargo.toml
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2020-01-29 12:40:27 +0000
committerEmil Lauridsen <[email protected]>2020-01-29 12:40:27 +0000
commit8ffbe86dfd24ffcc11ec37bceca9102260d59db2 (patch)
tree9b21617545fc358ebf2a47c8f28bf663a5a9afbc /crates/ra_cargo_watch/Cargo.toml
parent6fd29651b4f2bca8a36685a49d35cd349692984a (diff)
Parse cargo output a line at a time.
We previously used serde's stream deserializer to read json blobs from the cargo output. It has an issue though: If the deserializer encounters invalid input, it gets stuck reporting the same error again and again because it is unable to foward over the input until it reaches a new valid object. Reading a line at a time and manually deserializing fixes this issue, because cargo makes sure to only outpu one json blob per line, so should we encounter invalid input, we can just skip a line and continue. The main reason this would happen is stray printf-debugging in procedural macros, so we still report that an error occured, but we handle it gracefully now. Fixes #2935
Diffstat (limited to 'crates/ra_cargo_watch/Cargo.toml')
-rw-r--r--crates/ra_cargo_watch/Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_cargo_watch/Cargo.toml b/crates/ra_cargo_watch/Cargo.toml
index 49e06e0d3..dd814fc9d 100644
--- a/crates/ra_cargo_watch/Cargo.toml
+++ b/crates/ra_cargo_watch/Cargo.toml
@@ -11,6 +11,7 @@ log = "0.4.3"
11cargo_metadata = "0.9.1" 11cargo_metadata = "0.9.1"
12jod-thread = "0.1.0" 12jod-thread = "0.1.0"
13parking_lot = "0.10.0" 13parking_lot = "0.10.0"
14serde_json = "1.0.45"
14 15
15[dev-dependencies] 16[dev-dependencies]
16insta = "0.13.0" 17insta = "0.13.0"