Commit Graph

73 Commits

Author SHA1 Message Date
Amos Wenger
23d25a3094 Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
Laurențiu Nicola
6669f388a2 Bump indexmap 2022-07-03 10:09:35 +03:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
Lukas Wirth
8e91bb7660 minor: Bump dependencies 2022-03-22 17:42:24 +01:00
iDawer
676744be6e Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
Lukas Wirth
92f7db447c minor: Lift out FxIndex{Map/Set} types into ide_db 2021-11-16 12:15:47 +01:00
Laurențiu Nicola
8457ae34bd Set MSRV 2021-10-23 15:07:11 +03:00
Lukas Wirth
1294bfce86 Migrate to edition 2021 2021-10-21 20:10:40 +02:00
bors[bot]
f185d1c533
Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi

This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates.

Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes.

Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-10-12 18:35:03 +00:00
hamidreza kalbasi
0f49c97e93 internal changes for mdbook 2021-10-12 11:54:00 +03:30
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
龙方淞
51b1f7707b Update crates/vfs/src/vfs_path.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-28 10:20:35 +08:00
longfangsong
0049b5b0bc initial commit 2021-09-28 10:20:29 +08:00
Aleksey Kladov
629c68e80d internal: document that ascription is preferred to a turbo fish 2021-08-11 14:16:15 +03:00
Basti Ortiz
0986632c04
Fix: revert strange usage of ? operator 2021-08-10 22:44:15 +08:00
Basti Ortiz
27605b402e
Fix: prefer the usage of for loops over fold 2021-08-10 22:40:04 +08:00
Basti Ortiz
0e480a6e9c
Chore: add comments to explicitly express two-step check
See https://github.com/rust-analyzer/rust-analyzer/pull/9836#discussion_r685953381
2021-08-10 22:30:08 +08:00
Basti Ortiz
ae1288eeed
Fix: revert complex conditional in Directories::contains_file
This reverts commit 6d0336b2e4.
2021-08-10 22:25:43 +08:00
Basti Ortiz
7ee6cca3d7
Refactor: use iterator methods over for loops 2021-08-10 17:51:11 +08:00
Basti Ortiz
6d0336b2e4
Refactor: simplify logic for Directories::contains_file
The logic was simply inverted to accomodate for the short-circuiting `&&` operator.
2021-08-10 16:32:00 +08:00
Basti Ortiz
0765c9713b
Refactor: use filter_map when iterating over stored IDs and 2021-08-10 15:56:16 +08:00
Basti Ortiz
e912d6507f
Chore: use short-circuiting for file ID getter 2021-08-10 15:43:51 +08:00
Aleksey Kladov
9318c643f1 internal: make it easier to isolate IO 2021-07-17 17:55:16 +03:00
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Lukas Wirth
95c8c65139 Nest all the or-patterns! 2021-06-17 17:37:14 +02:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow 2021-06-13 09:24:16 +05:30
Alexandru Macovei
4e2a6ac7ea Avoid duplicating VfsPath in vfs::path_interner::PathInterner by using an IndexSet 2021-04-06 16:03:57 +03:00
Florian Diebold
a7387cae2c Fix slow tests sometimes failing
In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.
2021-02-12 16:31:16 +01:00
Arnaud
4b71c8332d Document vfs private items 2021-01-12 18:01:47 +01:00
Arnaud
311ec70d03 Document vfs public items 2021-01-12 18:01:36 +01:00
Arnaud
d216d718bf Use file_set::FileSet and FileSet consistently in doc
The first occurrence of `FileSet` has the full path (`file_set::FileSet`),
while every other is simply `FileSet`.
2021-01-07 12:18:25 +01:00
Arnaud
f80f4ff223 Use intra-doc links in vfs crate documentation 2021-01-07 12:17:38 +01:00
Arnaud
b6669b1c9b Remove the reference to WalkdirLoaderHandle in vfs documentation
This structure was deleted in commit #dad1333
2021-01-07 12:10:02 +01:00
bors[bot]
243ba330dd
Merge #6785
6785: Fix "no value set for FileTextQuery(FileId(..))" r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6622

Let's hope I got it right this time, but I feel like I slowly begin to understand the main loop logic.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-09 16:32:03 +00:00
Jonas Schievink
6857989f6f Fix "no value set for FileTextQuery(FileId(..))" 2020-12-09 17:30:46 +01:00
Aleksey Kladov
5e3891c255 . 2020-12-09 18:42:07 +03:00
Daiki Ihara
59bd6e2eea Extract tests module to file in vfs crate 2020-12-01 00:10:12 +09:00
Aleksey Kladov
ba8d6d1e4e Remove more unreachable pubs 2020-11-02 16:58:33 +01:00
Aleksey Kladov
b610118453 Deny unreachable-pub
It's very useful when `pub` is equivalent to "this is crate's public
API", let's enforce this!

Ideally, we should enforce it for local `cargo test`, and only during
CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
2020-11-02 14:07:08 +01:00
Kirill Bulatov
9863798480 Rename the method to avoid false promises 2020-09-10 01:45:49 +03:00
Kirill Bulatov
f4ee885b3b Add VirtualPath tests 2020-09-10 01:42:20 +03:00
Kirill Bulatov
33179a0ae1 Move rust-related logic from vfs to base_db level 2020-09-10 01:42:20 +03:00
Kirill Bulatov
b2bcc5278d Properly handle special cases (binaries, mod.rs) 2020-09-10 01:42:20 +03:00
Kirill Bulatov
897a4c702e Implement file name & extension retrieval method for VirtualPath 2020-09-10 01:42:20 +03:00
Kirill Bulatov
d163f9f114 Small refactoring 2020-09-10 01:42:20 +03:00
Kirill Bulatov
8aa740dab4 Happy path implemented 2020-09-10 01:42:20 +03:00
Kirill Bulatov
0de71f7bc9 Properly use FileSet API 2020-09-10 01:42:20 +03:00
Kirill Bulatov
17870a3e2c Better API 2020-09-10 01:42:20 +03:00
Kirill Bulatov
4bed588001 First steps for mod<|> completion 2020-09-10 01:42:20 +03:00