rust/crates
Aleksey Kladov b0c4b776b5 internal: add simple smoke test for project model
Our project model code is rather complicated -- the logic for lowering
from `cargo metadata` to `CrateGraph` is fiddly and special-case. So
far, we survived without testing this at all, but this increasingly
seems like a poor option.

So this PR introduces a simple tests just to detect the most obvious
failures. The idea here is that, although we rely on external processes
(cargo & rustc), we are actually using their stable interfaces, so we
might just mock out the outputs.

Long term, I would like to try to virtualize IO here, so as to do such
mocking in a more principled way, but lets start simple.

Should we forgo the mocking and just call `cargo metadata` directly
perhaps? Touch question -- I personally feel that fast, in-process tests
are more important in this case than any extra assurance we get from
running the real thing.

Super-long term, we would probably want to extend our heavy tests to
cover more use-cases, but we should figure a way to do that without
slowing the tests down for everyone.

Perhaps we need two-tiered bors system, where we pull from `master` into
`release` branch only when an additional set of tests passes?
2021-07-20 16:23:57 +03:00
..
base_db internal: explain why we avoid serializing everything 2021-07-19 17:47:56 +03:00
cfg internal: add simple smoke test for project model 2021-07-20 16:23:57 +03:00
flycheck internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
hir internal: get rid of a call to slow O(N) visibility_of function 2021-07-12 21:13:43 +03:00
hir_def Add TreeId to identify ItemTrees 2021-07-19 14:53:18 +02:00
hir_expand Update list of safe intrinsics 2021-07-08 15:49:39 +02:00
hir_ty Add test for #9560 2021-07-11 16:14:39 +02:00
ide internal: make it clearer where IO happens 2021-07-17 23:56:50 +03:00
ide_assists Merge #9614 2021-07-16 13:48:23 +00:00
ide_completion feat: improve parser error recovery for function parameters 2021-07-17 22:41:04 +03:00
ide_db internal: get rid of a call to slow O(N) visibility_of function 2021-07-12 21:13:43 +03:00
ide_diagnostics internal: remove one more needless extern crate 2021-07-11 15:48:49 +03:00
ide_ssr minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
mbe minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
parser Merge #9619 2021-07-18 09:10:56 +00:00
paths Fix AbsPath::ends_with 2021-07-18 10:25:14 +03:00
proc_macro_api internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
proc_macro_srv internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
proc_macro_test cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
profile minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
project_model internal: add simple smoke test for project model 2021-07-20 16:23:57 +03:00
rust-analyzer docs: publish Explaining Rust Analyzer series 2021-07-19 23:41:15 +03:00
sourcegen minor: make sure that project_root works correctly 2021-07-13 15:02:29 +03:00
stdx Remove proc macro management thread 2021-07-08 16:43:39 +02:00
syntax Merge #9619 2021-07-18 09:10:56 +00:00
test_utils Update inline_call assist doc example 2021-07-05 14:24:25 +02:00
text_edit minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
toolchain minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
tt minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
vfs internal: make it easier to isolate IO 2021-07-17 17:55:16 +03:00
vfs-notify internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00