Commit Graph

1480 Commits

Author SHA1 Message Date
Lukas Wirth
731b159f10 Remove dev-dependency diff 2024-02-07 16:34:21 +01:00
Lukas Wirth
e339c65a1a Remove dev-dependency insta 2024-02-07 16:30:20 +01:00
Lukas Wirth
bc5823d5bb Bump salsa dev-deps 2024-02-07 16:30:07 +01:00
Lukas Wirth
159a03ad7b Move salsa fork in-tree 2024-02-07 16:29:46 +01:00
Nadrieril
ba7b12e062 Update rustc_pattern_analysis dependency 2024-02-06 05:08:19 +01:00
bors
66cec4d11a Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
Laurențiu Nicola
7a0b887665 Bump rustc_index and rustc_abi 2024-02-02 09:00:21 +02:00
Laurențiu Nicola
ef07b05c0f Bump rustc_lexer and rustc_parse_format 2024-02-02 08:58:34 +02:00
Lukas Wirth
9e8a0fae0c Lint debug prints and disallowed types with clippy 2024-02-01 17:57:27 +01:00
bors
9d837a622d Auto merge of #16445 - lnicola:bump-scip, r=lnicola
internal: Bump scip

Fixes #16440
2024-01-31 09:27:01 +00:00
David Barsky
e1ea7c8844 internal: switch to tracing from log
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
bors
22b6f9679d Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
feat: Support for GOTO def from *inside* files included with include! macro

close #14937
Try to implement goto def from *inside* files included with include! macro.
This implementation has two limitations:
1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now)
2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
2024-01-30 11:27:18 +00:00
Laurențiu Nicola
20c01672a8 Bump scip 2024-01-30 08:43:17 +02:00
YangzeLuo
b22e772cab feat: Support for GOTO def from *inside* files included with include! macro 2024-01-27 23:36:01 +08:00
Laurențiu Nicola
ea94c10db0 Bump rustc_index and rustc_abi 2024-01-25 06:44:13 +02:00
Laurențiu Nicola
b1b99cbcf9 Bump rustc_lexer and rustc_parse_format 2024-01-25 06:42:48 +02:00
Nadrieril
2370b70f25 Replace local copy of exhaustiveness checking with upstream librarified version 2024-01-23 15:54:00 +01:00
roife
04ce4ce440 internal: speedup LineEndings calculation using 'memchr' 2024-01-18 17:03:29 +08:00
Lukas Wirth
35e05e07fb Bump smol_str 2024-01-16 11:07:45 +01:00
Moritz Hedtke
fe35447617 fix: rename generator to coroutine also in dependencies
Follow the rename in nightly (see https://blog.rust-lang.org/inside-rust/2023/10/23/coroutines.html)
2024-01-15 12:24:48 +01:00
Lukas Wirth
9c2d331e16 Bump salsa 2024-01-10 08:47:26 +01:00
Lukas Wirth
f972da70d4 Remove rustc_dependencies crate 2024-01-08 15:39:35 +01:00
Lukas Wirth
e25e0dd0ad Split out rustc_parse_format from rustc_dependencies 2024-01-08 15:30:26 +01:00
Lukas Wirth
b97ab00bd4 Split out rustc_lexer from rustc_dependencies 2024-01-08 15:24:46 +01:00
Lukas Wirth
963568b46f feat: IDE features for primitive tuple fields 2024-01-06 15:04:58 +01:00
Lukas Wirth
3c8dd9e89e Expose whether a channel has been dropped in lsp-server errors 2024-01-01 14:10:46 +01:00
Lukas Wirth
2a5b60b186 internal: Update world symbols request definiton, prefer focus range for macros 2023-12-22 11:42:08 +01:00
Lukas Wirth
ca957f4f82 Fix proc-macro-test-impl building without any proc-macros 2023-12-21 17:24:00 +01:00
Lukas Wirth
a892237ed4 Add rust-analyzer-span server feature equivalent to the ID server 2023-12-21 17:22:59 +01:00
Lukas Wirth
f48ecb6e09 Try to support pre and post-change metavars 2023-12-19 20:45:12 +01:00
Lukas Wirth
f49a2fed3f internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
Lukas Wirth
ec6162308e Move the SpanMap definition into the span crate 2023-12-18 14:50:48 +01:00
Lukas Wirth
66e29be1bd internal: Split out a span crate 2023-12-18 14:08:33 +01:00
Lukas Wirth
35620306a6 internal: Move proc-macro knowledge out of base-db 2023-12-18 12:37:18 +01:00
hkalbasi
7b9595a5ab Run rust-analyzer on rustc tests in metrics 2023-12-15 02:10:25 +03:30
Laurențiu Nicola
3b23e9aacc Bump line-index 2023-12-12 17:18:08 +02:00
Laurențiu Nicola
c30fd42685 Publish line-index 2023-12-12 16:57:44 +02:00
Lukas Wirth
b1a8f83a0c fix: Smaller spans for unresolved field and method diagnostics 2023-12-08 18:46:36 +01:00
bors
07d3128de2 Auto merge of #16043 - Veykril:dep-bump, r=Veykril
Bump and unlock some dependencies
2023-12-07 10:52:52 +00:00
Lukas Wirth
5544f4fa3d Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
bors
c4f0da96b3 Auto merge of #16042 - Veykril:salsa-bump, r=Veykril
internal: Bump salsa

Might f ix https://github.com/rust-lang/rust-analyzer/issues/15008, haven't tested
2023-12-07 09:59:50 +00:00
Lukas Wirth
45d81048c9 internal: Bump salsa 2023-12-07 10:57:51 +01:00
Lukas Wirth
a84685a58d Publish lsp-server 0.7.5 2023-12-06 22:00:01 +01:00
Lukas Wirth
9cb13b6efb Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
Laurențiu Nicola
73b9f885f6 Bump ra-ap-rustc_index and ra-ap-rustc_abi 2023-12-05 13:40:29 +02:00
Laurențiu Nicola
a9b037f510 Bump ra-ap-rustc_parse_format 2023-12-05 13:39:17 +02:00
Laurențiu Nicola
1834b38dbe Bump ra-ap-rustc_lexer 2023-12-05 13:38:35 +02:00
bors
e91fdf7860 Auto merge of #15959 - Veykril:macro-shower3, r=lnicola
TokenMap -> SpanMap rewrite

Opening early so I can have an overview over the full diff more easily, still very unfinished and lots of work to be done.

The gist of what this PR does is move away from assigning IDs to tokens in arguments and expansions and instead gives the subtrees the text ranges they are sourced from (made relative to some item for incrementality). This means we now only have a single map per expension, opposed to map for expansion and arguments.

A few of the things that are not done yet (in arbitrary order):
- [x] generally clean up the current mess
- [x] proc-macros, have been completely ignored so far
- [x] syntax fixups, has been commented out for the time being needs to be rewritten on top of some marker SyntaxContextId
- [x] macro invocation syntax contexts are not properly passed around yet, so $crate hygiene does not work in all cases (but most)
  - [x] builtin macros do not set spans properly, $crate basically does not work with them rn (which we use)
~~- [ ] remove all uses of dummy spans (or if that does not work, change the dummy entries for dummy spans so that tests will not silently pass due to havin a file id for the dummy file)~~
  - [x] de-queryfy `macro_expand`, the sole caller of it is `parse_macro_expansion`, and both of these are lru-cached with the same limit so having it be a query is pointless
- [x] docs and more docs
- [x] fix eager macro spans and other stuff
  - [x] simplify include! handling
- [x] Figure out how to undo the sudden `()` expression wrapping in expansions / alternatively prioritize getting invisible delimiters working again
- [x] Simplify InFile stuff and HirFIleId extensions
~~- [ ] span crate containing all the file ids, span stuff, ast ids. Then remove the dependency injection generics from tt and mbe~~

Fixes https://github.com/rust-lang/rust-analyzer/issues/10300
Fixes https://github.com/rust-lang/rust-analyzer/issues/15685
2023-12-04 19:59:53 +00:00
Lukas Wirth
b98597f06d Re-enable proc-macros 2023-11-28 16:28:56 +01:00
David Barsky
914a1570e2 internal: bump triomphe to 0.1.10 2023-11-28 10:27:17 -05:00