Commit graph

16118 commits

Author SHA1 Message Date
Laurențiu Nicola
e93a2bff67 Pin lsp-types 2022-10-25 15:03:35 +03:00
Laurențiu Nicola
956b96a19d Switch to upstream positionEncoding 2022-10-25 14:43:26 +03:00
bors
53b6d69e93 Auto merge of #13478 - Veykril:fix-flycheck, r=Veykril
fix: Fix standard flycheck command not being executed in the workspace it is being invoked for

Fixes https://github.com/rust-lang/rust-analyzer/issues/13477
2022-10-24 14:08:45 +00:00
Lukas Wirth
fbae83acd0 fix: Fix standard flycheck command not being executed in the workspace it is being invoked for 2022-10-24 16:07:42 +02:00
Lukas Wirth
6a00e14c7a fix: Don't respond with an error when requesting a shutdown while starting 2022-10-24 14:56:58 +02:00
Lukas Wirth
859f5594ac Handle multiple projects sharing dependency correctly in once strategy 2022-10-23 18:01:35 +02:00
Lukas Wirth
0f8904ec9c Implement invocation location config 2022-10-22 23:33:03 +02:00
bors
19efa0b110 Auto merge of #13463 - lowr:fix/builtin-derive-with-const-generics, r=Veykril
Support const generics for builtin derive macro

Fixes #13121

We have been treating every generic parameter as type parameter during builtin derive macro expansion. This patch adds support for const generics in such expansions.
2022-10-22 15:49:00 +00:00
Ryo Yoshida
6459d7f817
Support const generics for builtin derive macro 2022-10-23 00:05:22 +09:00
bors
d3b7e94d0a Auto merge of #13460 - emilio:scip-cleanups, r=Veykril
scip: minor clean-ups

Avoids a couple redundant hash map lookups and so.
2022-10-22 13:46:23 +00:00
Emilio Cobos Álvarez
ec6d72baa1
scip: Rewrite tests to be closer to what we actually do.
It's also less code.
2022-10-22 15:21:31 +02:00
Emilio Cobos Álvarez
bd49d01906
ide: Remove unnecessary continue. 2022-10-22 15:15:10 +02:00
Emilio Cobos Álvarez
7ee72256eb
scip: minor clean-ups
Avoids a couple redundant hash map lookups and so.
2022-10-22 14:14:43 +02:00
Lukas Wirth
de195ff97c fix: Fix DidSaveDocument requests blocking the server on startup 2022-10-20 19:55:04 +02:00
bors
f3cce5feea Auto merge of #13365 - feniljain:master, r=Veykril
feat: add multiple getters mode in `generate_getter`

This commit adds two modes to generate_getter action.
First, the plain old working on single fields.
Second, working on a selected range of fields.

Should partially solve #13246
If this gets approved will create a separate PR for setters version of the same

### Points to help in review:

- `generate_getter_from_record_info` contains code which is mostly taken from assist before refactor
- Same goes for `parse_record_fields`
- There are changes in other assists, as one of the methods in utils named `find_struct_impl` is changed, before it used to accept a single `fn_name`, now it takes a list of function names to check against. All old impls are updated to create a small list to pass their single element.

### Assumptions:

- If any of the fields have an implementation, the action will quit.
2022-10-20 12:07:28 +00:00
feniljain
5bff6c55de feat: add multiple getters mode in generate_getter
This commit adds two modes to generate_getter action.
First, the plain old working on single fields.
Second, working on a selected range of fields.
2022-10-20 16:47:23 +05:30
bors
a77ac93b2a Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril
Implement invocation strategy config

Fixes https://github.com/rust-lang/rust-analyzer/issues/10793

This allows to change how we run build scripts (and `checkOnSave`), exposing two configs:
- `once`: run the specified command once in the project root (the working dir of the server)
- `per_workspace`: run the specified command per workspace in the corresponding workspace

This also applies to `checkOnSave` likewise, though `once_in_root` is useless there currently, due to https://github.com/rust-lang/cargo/issues/11007
2022-10-19 21:53:19 +00:00
Lukas Wirth
46732369f4 Remove simplistic interpolation for manifest-path 2022-10-19 23:53:00 +02:00
Lukas Wirth
7db50294a3 {manifest-path} interpolation 2022-10-19 23:21:34 +02:00
Lukas Wirth
5174b65ed8 Use correct invocation strategy config for checkOnSave 2022-10-19 23:21:34 +02:00
Lukas Wirth
4a287d2525 Implement invocation strategy config for checkOnSave
Note that due to how cargo works, none of the modes currently work for r-a
2022-10-19 23:21:34 +02:00
Lukas Wirth
7e2c41dbd6 Implement invocation strategy config for build scripts 2022-10-19 23:21:29 +02:00
bors
82ac6f7d48 Auto merge of #13441 - Veykril:sysroot-logging, r=Veykril
Add some sysroot logging
2022-10-19 20:27:09 +00:00
Lukas Wirth
653dafa7b1 Add some sysroot logging 2022-10-19 22:26:44 +02:00
bors
339257397d Auto merge of #13439 - Veykril:simplify, r=Veykril
Simplify
2022-10-19 19:18:00 +00:00
Lukas Wirth
9d3e616f82 Simplify 2022-10-19 21:17:11 +02:00
Lukas Wirth
8047512dca
Revert "feat: Diagnose some incorrect usages of the question mark operator" 2022-10-18 14:18:59 +02:00
bors
4d4c05d32b Auto merge of #13428 - Veykril:fmt-stuck, r=Veykril
fix: Fix formatting requests hanging when r-a is still starting

The reason for that was that we were calculating the crate defmaps of the file we are saving by accident causing us to get stuck waiting on their expensive computation, while we only need the relevant crate id.

Closes https://github.com/rust-lang/rust-analyzer/issues/4054
Closes https://github.com/rust-lang/rust-analyzer/issues/11654
2022-10-17 16:21:32 +00:00
Lukas Wirth
a762baca02 fix: Fix formatting requests hanging when r-a is still starting
The reason for that was that we were calculating the crate defmaps
of the file we are saving by accident causing us to get stuck waiting
on their expensive computation, while we only need the relevant crate
id.
2022-10-17 18:21:18 +02:00
Lukas Wirth
e41023ce46 Make flycheck workdone progress reports cancellable 2022-10-17 16:32:47 +02:00
bors
a2e4f783a2 Auto merge of #13399 - DropDemBits:assists-format-args-capture-pt2, r=Veykril
Migrate assists to format args captures, part 2

Continuation of #13379

Migrates:

- `generate_constant`
- `generate_default_from_enum_variant`
- `generate_default_from_new`
- `generate_delegate_methods`
- `generate_deref`
- `generate_documentation_template`
- `generate_enum_is_method`
- `generate_enum_projection_method`
- `generate_from_impl_for_enum`
- `generate_function`
- `generate_getter`
- `generate_impl`
- `generate_new`
- `generate_setter`
2022-10-17 09:54:07 +00:00
bors
ee2d9eddb6 Auto merge of #13354 - Veykril:try-stuff, r=Veykril
feat: Diagnose some incorrect usages of the question mark operator

Trying to figure out how the type stuff in r-a works some more, I think I am doing this correct here but I am not quite sure :)
2022-10-16 11:11:08 +00:00
Lukas Wirth
381366f1dd Diagnose incorrect usages of the question mark operator 2022-10-16 12:58:24 +02:00
bors
4876693708 Auto merge of #13408 - lowr:patch/bump-chalk-0.86, r=Veykril
Bump chalk

There's a bug in current chalk that prevents us from properly supporting GATs, which is supposed to be fixed in v0.86. Note the following:
- v0.86 is only going to be released next Sunday so I'll keep this PR as draft until then.
- This doesn't compile without https://github.com/rust-lang/chalk/pull/779, which I hope will be included in v0.86. I confirmed this compiles with it locally.

Two breaking changes from v0.84:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder` (https://github.com/rust-lang/chalk/pull/772)
- `ProjectionTy::self_type_parameter()` has been removed (https://github.com/rust-lang/chalk/pull/778)
2022-10-16 10:57:23 +00:00
Ryo Yoshida
310a72bf47
Bump chalk to 0.86
Two breaking changes:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder`
- `ProjectionTy::self_type_parameter()` has been removed
2022-10-16 19:23:34 +09:00
Volkan Sagcan
dd4d3f0a09 fix #13105: Ignore auto-import assist on parameter names 2022-10-15 18:00:32 +02:00
bors
855cd5c280 Auto merge of #13418 - lnicola:bump-deps, r=lnicola
Bump deps
2022-10-15 11:27:12 +00:00
Laurențiu Nicola
342764d31a Add new license 2022-10-15 14:26:30 +03:00
Laurențiu Nicola
119e1bafcc Bump notify 2022-10-15 13:03:39 +03:00
Laurențiu Nicola
f5bbf9a06a Bump proc-macro2 2022-10-15 13:02:10 +03:00
Laurențiu Nicola
792920f441 Bump pulldown-cmark-to-cmark 2022-10-15 13:00:41 +03:00
Laurențiu Nicola
275848803b Bump mimalloc 2022-10-15 12:59:56 +03:00
Laurențiu Nicola
39777bf941 Bump rowan 2022-10-15 12:58:57 +03:00
Laurențiu Nicola
97eebbfab6 Bump url 2022-10-15 12:57:30 +03:00
Laurențiu Nicola
e294640484 Bump libc 2022-10-15 12:55:56 +03:00
Laurențiu Nicola
3a5f6a705e Bump dashmap 2022-10-15 12:54:25 +03:00
Laurențiu Nicola
6e74a22918 Bump home 2022-10-15 12:53:26 +03:00
Laurențiu Nicola
bb6990c4c9 Bump tracing 2022-10-15 12:52:34 +03:00
Laurențiu Nicola
50f990c46f Bump smallvec 2022-10-15 12:52:34 +03:00
Laurențiu Nicola
cbce0cda08 Bump anyhow, arbitrary, itertools, semver, serde 2022-10-15 12:52:34 +03:00