Commit graph

262219 commits

Author SHA1 Message Date
bors
a2b10a39bc Auto merge of #17862 - lnicola:publish-libs-members, r=lnicola
Only keep lib/ in publish-libs

Follow-up to #17860, see https://github.com/rust-lang/rust-analyzer/actions/runs/10350212090/job/28646162590.
2024-08-12 10:50:59 +00:00
Laurențiu Nicola
696ecea575 Only keep lib/ in publish-libs 2024-08-12 13:45:38 +03:00
bors
5e753ffe25 Auto merge of #17850 - Veykril:rust-analyzer-crate, r=Veykril
internal: Reply to requests with defaults when vfs is still loading

There is no reason for us to hit the database with queries when we certainly haven't reached a stable state yet. Instead we just reply with default request results until we are in a state where we can do meaningful work. This should save us from wasting resources while starting up at worst, and at best save us from creating query and interning entries that are non-meaningful which ultimately just end up wasting memory.
2024-08-12 10:21:06 +00:00
bors
563dc1cd33 Auto merge of #17860 - Veykril:publish-libs, r=Veykril
fix: Fix publish libs workflow
2024-08-12 10:06:38 +00:00
Lukas Wirth
234d383f5f internal: Reply to requests with defaults when vfs is still loading 2024-08-12 12:05:15 +02:00
Lukas Wirth
407944764a fix: Fix publish libs workflow 2024-08-12 11:52:04 +02:00
bors
7c53ff2da4 Auto merge of #17843 - mo8it:flycheck, r=Veykril
internal: Performance optimizations

- Use `Command::arg` directly
- Avoid the overhead of the `select!` macro when possible
- Use `select_biased!`
2024-08-12 09:27:47 +00:00
bors
c2d1555788 Auto merge of #17842 - mo8it:crossbeam-channel, r=Veykril
internal: Optimize the usage of channel senders

Used `Sender` directly instead of a boxed closure. There is no need to use the boxed closure. This also allows the caller to decide to do something other than `unwrap` (not a fan of it BTW).
2024-08-12 09:13:37 +00:00
bors
757b0a5ace Auto merge of #17859 - Veykril:rustc_deprecated_safe_2024, r=Veykril
fix: Correctly support `#[rustc_deprecated_safe_2024]`

Fixes https://github.com/rust-lang/rust-analyzer/issues/17852
2024-08-12 08:59:08 +00:00
Lukas Wirth
3355c788f1 fix: Correctly support #[rustc_deprecated_safe_2024] 2024-08-12 10:56:59 +02:00
mo8it
f7c4716dbf Use the send method 2024-08-12 10:55:04 +02:00
mo8it
285285d3fd Add more track_caller 2024-08-12 10:54:46 +02:00
mo8it
7586ba6bfb Add track_caller 2024-08-12 10:44:00 +02:00
mo8it
94bd4da3f1 Revert "Remove unneeded send method"
This reverts commit 567bde603cfeedb5cfc44e441578c5416bfc4f35.
2024-08-12 10:42:35 +02:00
bors
12a3d0112c Auto merge of #17833 - edevil:fix_expansion_limit, r=Veykril
Reuse recursion limit as expansion limit

A configurable recursion limit was introduced by looking at the recursion_limit crate attribute. Instead of relying on a global constant we will reuse this value for expansion limit as well.

Addresses: https://github.com/rust-lang/rust-analyzer/issues/8640#issuecomment-2271740272
2024-08-12 08:22:55 +00:00
bors
3ef56c2bb8 Auto merge of #17845 - ShoyuVanilla:tait, r=Veykril
feat: Implement TAIT and fix ATPIT a bit

Closes #16296 (Commented on the issue)

In #16852, I implemented ATPIT, but as I didn't discern ATPIT and other non-assoc TAIT, I guess that it has been working for some TAITs.

As the definining usage of TAIT requires it should be appear in the Def body's type(const blocks' type annotations or functions' signatures), this can be done in simlilar way with ATPIT

And this PR also corrects some defining-usage resolution for ATPIT
2024-08-12 08:08:40 +00:00
mo8it
97a6fc65f1 Fix deadlock 2024-08-11 14:58:50 +02:00
bors
ec03068320 Auto merge of #17844 - Veykril:find-path-std-fix, r=Veykril
fix: Fix find_path not respecting non-std preference config correctly

Fixes https://github.com/rust-lang/rust-analyzer/issues/17840
2024-08-10 15:47:18 +00:00
bors
2e0f5f6336 Auto merge of #17849 - Veykril:rust-analyzer-crate, r=Veykril
internal: Move some main crate stuff
2024-08-10 15:07:37 +00:00
Lukas Wirth
01262d972a Add comments regarding workspace structure change querying 2024-08-10 17:04:38 +02:00
Lukas Wirth
e219ac64c0 Move some stuff 2024-08-10 16:46:53 +02:00
Lukas Wirth
cbd00f1dda fix: Fix find_path not respecting non-std preference config correctly 2024-08-10 10:32:10 +02:00
Shoyu Vanilla
18b9458d64 feat: Implement TAIT 2024-08-10 15:22:05 +09:00
mo8it
204fb5bd4d Avoid the overhead of select! when possible 2024-08-10 02:12:09 +02:00
mo8it
35903a22aa Use select_biased 2024-08-10 02:05:08 +02:00
mo8it
dd90d4e122 Simplify check_command while avoiding allocations 2024-08-10 00:24:55 +02:00
mo8it
7341b88e6f Remove unneeded send method 2024-08-09 23:59:42 +02:00
mo8it
58c614f5b4 Use crossbeam-channel from the workspace 2024-08-09 23:48:03 +02:00
mo8it
f4b1b4bb82 Use Sender instead of boxed closure in vfs 2024-08-09 23:40:32 +02:00
mo8it
03a7abc48f Use Sender directly instead of a boxed closure 2024-08-09 23:24:57 +02:00
bors
bee4926ae7 Auto merge of #17836 - winstxnhdw:sysroot, r=Veykril
minor: log error when sysroot can't be discovered

Closes #17808
2024-08-09 09:20:44 +00:00
winstxnhdw
077403a053
minor: log error when sysroot can't be discovered 2024-08-09 03:50:48 +08:00
André Cruz
e6d426e723
Reuse recursion limit as expansion limit
A configurable recursion limit was introduced by looking at the
recursion_limit crate attribute. Instead of relying on a global constant
we will reuse this value for expansion limit as well.
2024-08-08 17:12:20 +01:00
bors
b086040121 Auto merge of #17832 - ShoyuVanilla:issue-17811, r=Veykril
fix: Panic while rendering function type hint with impl trait arg

Fixes #17811
2024-08-08 13:39:42 +00:00
Shoyu Vanilla
ce846da6d6 fix: Panic while rendering function with impl trait arg 2024-08-08 22:03:31 +09:00
bors
8666a717db Auto merge of #17831 - Veykril:flycheck-move-to-rust-analyzer, r=Veykril
internal: Move and split flycheck crate into rust-analyzer main crate

The crate no longer is about flychecking, it mainly hosts common command process handling shared by flycheck, test explorer and now project discovery. This re-organizes that into the main crate.
2024-08-08 11:10:28 +00:00
Lukas Wirth
8ff6b2f160 Split up flycheck module 2024-08-08 13:08:50 +02:00
Lukas Wirth
1114de0c37 Move flycheck crate into rust-analyzer main crate 2024-08-08 13:06:39 +02:00
bors
fe4d83c462 Auto merge of #17827 - regexident:improve-crate-manifests-continuation, r=lnicola
Improve crate manifest of 'syntax-bridge', adding missing `[package.repository]` and `[package.description]` fields

This is a follow-up of https://github.com/rust-lang/rust-analyzer/pull/17745, specifically [this comment](https://github.com/rust-lang/rust-analyzer/pull/17745#issuecomment-2271102382) by `@lnicola.`

It refines the manifest of the newly added 'syntax-bridge' crate, adding a `[package.repository]` as `workspace = true` and changes the existing `[package.description]` from "TBD" to a more useful description.
2024-08-08 09:35:56 +00:00
Vincent Esche
d8bb3c80f5 Add missing [package.description] for 'syntax-bridge' crate 2024-08-07 19:58:13 +02:00
Vincent Esche
1555fd9a39 Make 'syntax-bridge' crate inherit [package.repository] from workspace 2024-08-07 19:57:59 +02:00
bors
2a6655a9d7 Auto merge of #17825 - Veykril:server-things, r=Veykril
internal: Offload diagnostics serialization to the task pool
2024-08-07 15:01:52 +00:00
bors
7614de46ae Auto merge of #17824 - ShoyuVanilla:fix-diags, r=Veykril
fix: Native diagnostics not working

              This should be a `continue` now

_Originally posted by `@Veykril` in https://github.com/rust-lang/rust-analyzer/pull/17775#discussion_r1706845633_

I've tested the release compile output with IDE in the original PR, but my test workspace had only one `.rs` file 🤦 😢
2024-08-07 14:47:34 +00:00
Lukas Wirth
3e4632d993 Offload diagnostics serialization to the task pool 2024-08-07 16:43:51 +02:00
Lukas Wirth
e7086a35b5 Slightly quieter fatal panics 2024-08-07 16:35:58 +02:00
Shoyu Vanilla
d366706cc3 Fix native diagnostics not working 2024-08-07 23:33:39 +09:00
bors
6fc5d09ab2 Auto merge of #17823 - Veykril:mod-unconfigured-diag, r=Veykril
fix: Fix unconfigured diagnostic being attached to the wrong file for modules

Fixes https://github.com/rust-lang/rust-analyzer/issues/17817
2024-08-07 13:08:35 +00:00
Lukas Wirth
c4809d0d6e Fix unconfigured diagnostic being attached to the wrong file for modules 2024-08-07 15:07:09 +02:00
bors
359d5b9283 Auto merge of #17821 - Veykril:project-model-cleanup, r=Veykril
internal: Remove unnecessary CfgFlag definition in project-model
2024-08-07 12:46:26 +00:00
Lukas Wirth
f1f048c9c9 Fix cargo config get env parsing 2024-08-07 14:36:22 +02:00