rust-analyzer/crates
Emil Lauridsen 8ffbe86dfd 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
2020-01-29 13:40:27 +01:00
..
ra_arena Switch to variant-granularity field type inference 2019-11-25 00:12:36 +03:00
ra_assists Code review fixes 2020-01-27 14:42:45 +02:00
ra_batch Support setting cargo features 2019-12-13 18:16:34 +08:00
ra_cargo_watch Parse cargo output a line at a time. 2020-01-29 13:40:27 +01:00
ra_cfg Disable doctests 2019-11-17 18:35:05 +03:00
ra_cli Disable env_logger humantime feature 2020-01-25 11:53:40 +01:00
ra_db Remove the Default impl for SourceRoot 2020-01-08 19:42:27 +01:00
ra_fmt fix 2190; add test for "replace if let with match" 2019-11-20 19:01:06 +01:00
ra_hir Code review fixes 2020-01-27 14:42:45 +02:00
ra_hir_def Merge #2917 2020-01-28 16:22:18 +00:00
ra_hir_expand Prefer imports starting with std 2020-01-28 01:02:06 +02:00
ra_hir_ty Standard formatting for array types 2020-01-28 15:32:20 +01:00
ra_ide Improves reference search by StructLiteral 2020-01-27 21:34:19 +00:00
ra_lsp_server Complain loudly if the main loop is blocked 2020-01-29 11:21:49 +01:00
ra_mbe Add details about test_repeat_bad_var current state 2019-12-30 17:12:20 +01:00
ra_parser ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind() 2020-01-22 13:02:21 +02:00
ra_prof Add print_time helper 2020-01-25 11:59:11 +01:00
ra_project_model Address nit 2020-01-10 22:41:52 +01:00
ra_syntax Fixed a typo 2020-01-22 13:02:21 +02:00
ra_text_edit Disable doctests 2019-11-17 18:35:05 +03:00
ra_tt Refactoring 2019-12-18 13:10:37 +08:00
ra_vfs_glob Disable doctests 2019-11-17 18:35:05 +03:00
test_utils test_utils: move flush!() to its usage as per conversation with @matklad 2020-01-29 03:53:15 +02:00