Lukas Wirth
e60f3d265f
Split the hover module up
2021-09-23 20:36:15 +02:00
Lukas Wirth
8b2be8572f
Rename some assists
2021-09-21 00:54:09 +02:00
Lukas Wirth
dfb94d09d4
Exclude test file from rust tidy check
2021-09-14 00:21:16 +02:00
Lukas Wirth
edc915fbb6
Add proc-macro fixture directive
2021-09-13 18:37:50 +02:00
Jörg Sommer
c87b860d3d
Use todo!()
instead of ()
for missing fields
...
The generated code with `()` doesn't compile in most of the cases. To signal
the developer there's something to do, fill in `todo!()`.
Because the file *missing_fields.rs* contains the string `todo!()` it needs
an exception for the test *check_todo*.
2021-09-09 18:04:50 +02:00
Dezhi Wu
ba0947dded
switch log
crate to tracing
2021-08-30 15:11:42 +08:00
Yoshua Wuyts
326890753c
implement feedback from review
2021-08-10 12:21:48 +02:00
Yoshua Wuyts
d6b788a9ee
Add trait codegen to add_missing_impl_members
assist
2021-08-10 10:27:52 +02:00
Yoshua Wuyts
5a3c3a029c
exclude files from tidy check
2021-08-08 18:44:54 +02:00
Aleksey Kladov
b97eec8c0e
fix tests
2021-07-19 16:38:36 +03:00
Lukas Wirth
d837a5d5a7
Show test mod runnable in outline modules
2021-07-14 11:30:51 +02:00
Aleksey Kladov
90e27d6289
internal: make xtask
lighter
...
Moving tests to `rust-analyzer` crate allows removing walkdir dependency
from `xtask`. It does seem more reasonable to keep tidy tests outside of
the "build system" and closer to other integration tests.
2021-07-04 12:47:56 +03:00
Aleksey Kladov
58d2ece88a
internal: overhaul code generation
...
* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.
This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).
2021-07-03 22:11:03 +03:00
Aleksey Kladov
f521e41853
internal: introduce minicore -- a subset of libcore for testing
2021-06-15 21:03:08 +03:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
Aleksey Kladov
459b0332d3
internal: use more evocative test folder name
2021-05-17 19:01:54 +03:00
Aleksey Kladov
41510f437e
minor: adjust config name
2021-05-17 18:37:06 +03:00
John Renner
7ae3967e57
Formatting and docs
2021-05-10 13:34:09 -07:00
John Renner
c3ba1f14fa
Allow semantic tokens for strings to be disabled
2021-05-10 13:09:38 -07:00
Aleksey Kladov
21f4588fc8
internal: fix slightly broken test
2021-04-19 18:57:47 +03:00
Aleksey Kladov
06a633ff42
feat: improve performance by delaying computation of fixes for diagnostics
2021-04-13 12:09:04 +03:00
Aleksey Kladov
460f0ef669
internal: unfork code paths for unresolved and resolved assist
2021-04-13 10:59:15 +03:00
Aleksey Kladov
186c5c47cb
feat: avoid checking the whole project during initial loading
2021-04-12 15:29:31 +03:00
Aleksey Kladov
8fe20b19d4
More robust status notifications
2021-04-06 15:45:31 +03:00
Edwin Cheng
f41ae64722
Ignore proc-macro stdout to prevent IPC crash
2021-03-24 03:44:28 +08:00
Matthias Krüger
202b51bc7b
a lot of clippy::style fixes
2021-03-21 16:15:41 +01:00
Lukas Wirth
a9a7c5cb1f
Don't return a SourceChange on WillRenameFiles when nothing gets refactored
2021-03-20 13:57:58 +01:00
Aleksey Kladov
da73c93c7f
Don't punish every crate with serde-json
2021-03-08 20:37:20 +03:00
Aleksey Kladov
4d14617636
Speedup heavy tests
...
We used to skip sysroot, but this logic got bitrotted, reinstalling.
2021-03-01 12:14:16 +03:00
Dániel Buga
cb39f2df94
Clean up unused field warning
2021-03-01 09:12:42 +01:00
Aleksey Kladov
30b8468c7e
Simplify heavy tests
...
Progress notifications are edge triggered, while status is level
triggered. This makes it a hared to misuse signal for the readiness of
the server.
2021-01-28 19:15:49 +03:00
Aleksey Kladov
a44f6c18fb
Use RA_LOG in tests
2021-01-28 16:49:07 +03:00
Aleksey Kladov
a58fa29dc2
Easier to debug timeouts in tests
2021-01-28 16:00:33 +03:00
bors[bot]
42e00032c6
Merge #7220
...
7220: same level folder rename for will_rename_files r=kjeremy a=ShuiRuTian
use tricky way to support folder rename.
Another step after #7009 and for #4471
Co-authored-by: ShuiRuTian <158983297@qq.com>
Co-authored-by: Song Gao <158983297@qq.com>
2021-01-13 17:40:45 +00:00
ShuiRuTian
727a7827fd
fix windows test.
2021-01-13 22:56:31 +08:00
ShuiRuTian
76e6589016
unwrap.
2021-01-13 12:10:45 +08:00
ShuiRuTian
6a15876fc4
skip slow tests.
2021-01-13 00:58:28 +08:00
ShuiRuTian
5f8fa66b77
use path rather than hard code.
2021-01-13 00:53:17 +08:00
ShuiRuTian
e1c9c9b604
fix and add tests.
2021-01-13 00:30:49 +08:00
Aleksey Kladov
edf03548e3
More readable test
2021-01-06 18:36:13 +03:00
Aleksey Kladov
f7a15b5cd1
More maintainable config
...
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.
This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Aleksey Kladov
624eb1ee54
More maintainable caps config
...
The idea here is that we preserve client's config as is, without
changes. This gets rid of state!
2021-01-05 17:46:57 +03:00
Jesse Bakker
f355a6d831
Split textDocument/formatting TextEdit with diff
2020-12-31 15:33:20 +01:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Aleksey Kladov
4dfda64b39
Cleanup workspace loading a tiny bit
2020-11-13 17:38:26 +01:00
Aleksey Kladov
ba8d6d1e4e
Remove more unreachable pubs
2020-11-02 16:58:33 +01:00
Igor Aleksanov
4ebacf9024
Fix failing test
2020-10-02 12:35:25 +03:00
Josh Stone
29c3421391
Don't return any TextEdit if formatting is unchanged
...
I found that `textDocument/formatting` was always returning a full
`TextEdit` replacement, even when there are no changes, which caused Vim
(w/ vim-lsp) to always indicate a modified buffer after formatting. We
can easily compare whether there were changes and return `null` if not,
so the client knows there's nothing to do.
2020-09-16 10:05:41 -07:00
Aleksey Kladov
c6dffe479b
Cleanup heavy tests
2020-08-25 19:26:45 +02:00
Zac Pullar-Strecker
7bbca7a1b3
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
2020-08-24 21:20:13 +12:00
Aleksey Kladov
6cff076513
Revive cache cleaning
...
The idea here is that, on CI, we only want to cache crates.io
dependencies, and not local crates. This keeps the size of the cache
low, and also improves performance, as network and moving files on
disk (on Windows) can be slow.
2020-08-18 11:07:21 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Aleksey Kladov
208b7bd7ba
Rename ra_prof -> profile
2020-08-12 16:35:29 +02:00
Zac Pullar-Strecker
b34ad4bc8a
update & configure cmark to render three backticks
2020-08-02 20:32:09 +12:00
Zac Pullar-Strecker
f05d7b41a7
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
...
Hasn't fixed tests yet.
2020-07-31 14:12:44 +12:00
Kirill Bulatov
85d71f4dff
Run package-specific cargo check and test for all targets
2020-07-29 15:35:27 +03:00
Aleksey Kladov
97d309ea4b
Bump test timeout for macs
2020-07-28 10:31:08 +02:00
Aleksey Kladov
be06aaecde
Lighter weight tempdir
2020-07-23 22:26:25 +02:00
Aleksey Kladov
7c0743293e
Require quotes around key-value cfg flags in rust-project.json
...
This matches rustc command-line flags, as well as the build.rs format.
2020-07-23 19:03:17 +02:00
Jeremy Kolb
d7cd88b1a2
Mark machine applicable fixes as preferred
...
This allows us to run the auto fix command from vscode to automatically
fix all diagnostics in the file.
They are also distinguished in the UI.
2020-07-16 10:51:25 -04:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
6c7578bd7a
Move cargo metadata off the main loop
2020-07-02 17:39:51 +02:00
Aleksey Kladov
4f26a3734e
Indicate when project needs a reload
2020-07-02 15:34:12 +02:00
Zac Pullar-Strecker
73d5a31450
Update missed heavy test
2020-06-30 20:10:23 +12:00
Laurențiu Nicola
b4420626fb
Add support for include_str
2020-06-27 19:34:48 +03:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
Aleksey Kladov
a0b76161ab
Disable file watching when running slow tests
...
This should rid us of the intermittent test failure
https://github.com/rust-analyzer/rust-analyzer/pull/5017#issuecomment-648717983
2020-06-24 12:27:13 +02:00
Aleksey Kladov
7ce122b1df
Remove useless test code
2020-06-23 23:45:40 +02:00
Aleksey Kladov
aa69757a01
More principled indentation trimming in fixtures
2020-06-23 23:33:41 +02:00
Aleksey Kladov
a34f9b7fb3
Docs for Fixture
2020-06-23 18:58:45 +02:00
Aleksey Kladov
21f751a0e5
Simplify
2020-06-23 18:37:26 +02:00
Aleksey Kladov
30748161f0
Simplify
2020-06-23 18:37:26 +02:00
Aleksey Kladov
dad1333b48
New VFS
2020-06-23 17:51:06 +02:00
Aleksey Kladov
6a6098d4c3
Remove RelativePathBuf from fixture
...
The paths in fixture are not really relative (the default one is
`/main.rs`), so it doesn't make sense to use `RelativePathBuf` here.
2020-06-23 00:14:44 +02:00
Aleksey Kladov
c9a41bd92d
Actually test include!(concant!(env!()));
...
It triggered index-based goto definition before :-(
2020-06-05 15:49:12 +02:00
Aleksey Kladov
cb9d9040f7
Cleanup test
2020-06-05 15:14:47 +02:00
Jeremy Kolb
9e71fc0314
Mark fixes from diagnostics as quick fixes
2020-06-03 09:31:32 -04:00
Aleksey Kladov
2e7d12d2f3
Drop test for old format
2020-06-03 12:39:11 +02:00
Aleksey Kladov
8baa4c5d07
Groundwork for specifying the set of projects via config
2020-06-03 12:22:01 +02:00
Aleksey Kladov
ee181cf683
Drop no-project test
...
Eventually, we should support "just open random rust file" use case,
we don't really do this now, so let's avoid spending time on it until
we fix it properly.
2020-06-03 11:07:04 +02:00
Aleksey Kladov
ac4782ef11
Merge pull request #4382 from woody77/json_cfgs
...
Begin transition to new fields for JsonProject crate cfgs
2020-06-03 10:28:15 +02:00
Aleksey Kladov
bc3db7c1de
Fix tests
2020-06-02 18:09:12 +02:00
veetaha
d605ec9c32
Change Runnable.bin -> Runnable.kind
...
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
2020-05-31 05:21:45 +03:00
veetaha
a419cedb1c
Fix tests, apply code review proposals
2020-05-31 03:10:23 +03:00
Aaron Loucks
a047f10839
Hover tooltip module name is monospace once again
...
The line separator is moved below the function signature to split
regions between the docs. This is very similar to how IntelliJ
displays tooltips. Adding an additional separator between the module
name and function signature currently has rendering issues.
Fixes #4594
Alternative to #4615
2020-05-25 23:18:45 -04:00
Aleksey Kladov
76e170c3d0
Less rust-analyzer specific onEnter
2020-05-25 14:28:47 +02:00
Aleksey Kladov
f26b7928e0
Merge pull request #4495 from vsrs/fixture_meta
...
Test fixtures parsing improvements
2020-05-24 15:32:52 +02:00
Galilée 'Bill' Enguehard
6197a960df
Fix resolve_proc_macro heavy test
2020-05-23 08:59:51 +02:00
Aleksey Kladov
4b495da368
Transition OnEnter to WorkspaceSnippetEdit
...
This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer
2020-05-21 15:08:03 +02:00
Aleksey Kladov
3e9bf7ebab
Update test data
2020-05-19 20:29:18 +02:00
vsrs
256fb7556e
Remove temporary FixtureEntry parsed_meta field.
2020-05-16 12:25:26 +03:00
Jeremy Kolb
d4471dccfe
Check client capabilities before sending progress notifications
...
Fixes #4384
2020-05-11 13:16:46 -04:00
Aleksey Kladov
3bec2be9de
req -> lsp_ext
2020-05-10 19:27:12 +02:00
Aaron Wood
beb79ed104
Begin transition to new fields for JsonProject crate cfgs
...
This starts the transition to a new method of documenting the cfgs that are
enabled for a given crate in the json file. This is changing from a list
of atoms and a dict of key:value pairs, to a list of strings that is
equivalent to that returned by `rustc --print cfg ..`, and parsed in the
same manner by rust-analyzer.
This is the first of two changes, which adds the new field that contains
the list of strings. Next change will complete the transition and remove
the previous fields.
2020-05-08 16:59:52 -07:00
bors[bot]
1b136aae0b
Merge #4296
...
4296: Support cargo:rustc-cfg in build.rs r=matklad a=robojumper
Fixes #4238 .
Co-authored-by: robojumper <robojumper@gmail.com>
2020-05-07 18:50:00 +00:00
Aleksey Kladov
3908fad1fe
Normalize naming of diagnostics
2020-05-05 21:35:30 +02:00
robojumper
059fc86963
Merge heavy tests
2020-05-05 14:53:18 +02:00
robojumper
2980ba1fde
Support build.rs cargo:rustc-cfg
2020-05-04 13:29:09 +02:00
Aleksey Kladov
247d32cbfd
Test/check the whole package
...
Closes #4255
2020-05-02 10:57:37 +02:00
kjeremy
e3ee61f5e8
Filter out CodeActions if a server only support commands.
2020-05-01 13:44:32 -04:00