8ffbe86dfd
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
18 lines
370 B
TOML
18 lines
370 B
TOML
[package]
|
|
edition = "2018"
|
|
name = "ra_cargo_watch"
|
|
version = "0.1.0"
|
|
authors = ["rust-analyzer developers"]
|
|
|
|
[dependencies]
|
|
crossbeam-channel = "0.4"
|
|
lsp-types = { version = "0.70.0", features = ["proposed"] }
|
|
log = "0.4.3"
|
|
cargo_metadata = "0.9.1"
|
|
jod-thread = "0.1.0"
|
|
parking_lot = "0.10.0"
|
|
serde_json = "1.0.45"
|
|
|
|
[dev-dependencies]
|
|
insta = "0.13.0"
|
|
serde_json = "1.0" |