Commit graph

44 commits

Author SHA1 Message Date
Aleksey Kladov
cdfe5a8be0 fix: no more Registering progress handler for token rustAnalyzer/Indexing failed. 2021-04-20 22:54:05 +03:00
Aleksey Kladov
1772eb0f1a fix: no longer get stuck on windows
reading both stdout & stderr is a common gotcha, you need to drain them
concurrently to avoid deadlocks. Not sure why I didn't do the right
thing from the start. Seems like I assumed the stderr is short? That's
not the case when cargo spams `compiling xyz` messages
2021-04-20 18:02:54 +03:00
Aleksey Kladov
de33702784 feat: show errors from cargo metadata and initial cargo check in the status bar
closes #3155
2021-04-06 18:08:05 +03:00
Lukas Wirth
eeb5bfcfab Cleanup decl_check 2021-02-05 16:09:45 +01:00
Aleksey Kladov
d35bda6429 Make always-assert crate reusable 2021-01-26 22:13:42 +03:00
Aleksey Kladov
738d9cdfde stave off zombies 2021-01-22 19:50:56 +03:00
Joshua Nelson
e7d1f30cb3 Fix warnings when running cargo doc --document-private-items
These were the warnings previously:

```
warning: could not parse code block as Rust code
   --> crates/stdx/src/lib.rs:137:9
    |
137 |   ///     ∀ x in slice[..idx]:  pred(x)
    |  _________^
138 | | ///  && ∀ x in slice[idx..]: !pred(x)
    | |____^
    |
    = note: error from rustc: unknown start of token: \u{2200}

warning: 1 warning emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted
```

This does *not* fix the following warning, because it is actually rust
code and rustdoc is being over eager:

```
warning: Rust code block is empty
  --> crates/parser/src/grammar.rs:16:5
   |
16 |   //! ```
   |  _____^
17 | | //! // test function_with_zero_parameters
18 | | //! // fn foo() {}
19 | | //! ```
   | |_______^
   |
help: mark blocks that do not contain Rust code as text
   |
16 | //! ```text
   |     ^^^^^^^
```

https://github.com/rust-lang/rust/pull/79816 should make this
configurable so the warning can be `allow`ed.
2021-01-18 16:44:40 -05:00
Lukas Wirth
e23bfafb32 Fix assert_never invoking assert_always 2021-01-14 22:43:09 +01:00
Aleksey Kladov
8dc68ecdfc Introduce more appropriate assertion mechanism
rust-analyzer is a long-running program, so we *should* handle assertion
failures.

See also https://www.sqlite.org/assert.html.
2021-01-14 18:25:19 +03:00
Aleksey Kladov
865e05b5b4 Make printin the backtrace more convenient 2021-01-14 14:55:13 +03:00
Aleksey Kladov
fc3fc571d2 Cleaner API 2021-01-10 14:36:15 +03:00
Aleksey Kladov
e30c1c3fbf Simplify highlighting infra
This also fixes the killer whale bug
2021-01-08 23:47:35 +03:00
Edwin Cheng
54eb87de03 Refactor out JodChild 2021-01-08 01:08:34 +08:00
Aleksey Kladov
731f7bfc02 Replace RacyFlag with OnceCell 2020-11-11 03:11:40 +01:00
Aleksey Kladov
1a74f25f90 Fix panic context 2020-10-23 15:18:33 +02:00
Igor Aleksanov
559cc97073 Add to_upper_snake_case function to stdx 2020-10-12 11:05:00 +03:00
Igor Aleksanov
f2c91fc5a8 Apply suggestions from code review
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-12 11:05:00 +03:00
Igor Aleksanov
17f1026c46 Improve string helpers functions 2020-10-12 10:59:54 +03:00
Zac Pullar-Strecker
974518fde7 Code reorganisation and field support 2020-10-08 15:04:20 +13:00
Aleksey Kladov
d3a2b21a8c Add panic_context module for better panic messages 2020-09-29 20:20:47 +02:00
Pavan Kumar Sunkara
335add49db Add description for crates that will be published 2020-08-24 13:07:22 +02:00
Aleksey Kladov
17d6efe6f2 Make RacyFlag actually work 2020-08-18 23:51:01 +02:00
Aleksey Kladov
aad911fb0c Speedup ty tests
Closes #5792
2020-08-18 17:20:57 +02:00
Aleksey Kladov
9389e313d0 Minor 2020-08-18 13:20:28 +02:00
Aleksey Kladov
1b0c7701cc Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
Aleksey Kladov
1c359ab634 Replace SepBy with Itertools 2020-08-12 15:04:06 +02:00
Igor Aleksanov
6344a7f362 Fix clippy warnings 2020-08-10 15:05:01 +03:00
Aleksey Kladov
be49547b44 Use split_once polyfill 2020-07-30 22:23:12 +02:00
Aleksey Kladov
4f7a3fba59 Replace superslice with API on path to stabilization 2020-07-23 12:59:18 +02:00
Yuki Okushi
6f423466d1
Add a license field to all the crates 2020-07-14 10:57:26 +09:00
Aleksey Kladov
693ac892f2 Don't copy-paste impl_froms into every crate 2020-07-13 16:21:02 +02:00
Aleksey Kladov
6b4cf5b7d8 Move stdx macros into submodule 2020-07-13 16:21:02 +02:00
Aleksey Kladov
e7ba7f47a7 Profiling tweaks 2020-07-11 03:04:37 +02:00
Aleksey Kladov
aa69757a01 More principled indentation trimming in fixtures 2020-06-23 23:33:41 +02:00
Aleksey Kladov
ff687453a8 Slightly better name 2020-06-23 21:29:50 +02:00
Aleksey Kladov
b9f3c5d585 Speedup VFS::partition
The task of `partition` function is to bin the flat list of paths into
disjoint filesets. Ideally, it should be incremental -- each new file
should be added to a specific fileset.

However, preliminary measurnments show that it is actually fast enough
if we just optimize this to use a binary search instead of a linear
scan.
2020-06-19 15:07:32 +02:00
Aaron Loucks
f06b2bcd91 Use split1 when formatting function signature params 2020-06-03 07:26:15 -04:00
Aleksey Kladov
8eb3272ad6 Use snippets in add function 2020-05-20 01:23:05 +02:00
Kirill Bulatov
66882f1a24 Move snake case method to heck 2020-05-03 21:35:21 +03:00
Aleksey Kladov
1b68c72fe9 Move timeit to stdx 2020-04-10 20:46:42 +02:00
Aleksey Kladov
bf569f8b29 Check for eprintln on CI 2020-04-06 17:00:18 +02:00
Aleksey Kladov
beab6f34ce Fix typo 2020-03-30 18:51:30 +02:00
Aleksey Kladov
6596e7cddf Nice string formatting 2020-03-28 12:27:54 +01:00
Aleksey Kladov
b764c38436 Start stdx
This crate will hold everything to small to be worth publishing
2020-03-28 11:01:25 +01:00