Commit graph

31209 commits

Author SHA1 Message Date
Lukas Wirth
6bb29b1b54 Split up flycheck module 2024-08-08 13:08:50 +02:00
Lukas Wirth
085e4126e6 Move flycheck crate into rust-analyzer main crate 2024-08-08 13:06:39 +02:00
bors
b02c6bff7d 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
b8cf3c48f3 Add missing [package.description] for 'syntax-bridge' crate 2024-08-07 19:58:13 +02:00
Vincent Esche
a966f6ec31 Make 'syntax-bridge' crate inherit [package.repository] from workspace 2024-08-07 19:57:59 +02:00
bors
935883fd82 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
9f69ed32b2 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
a147018e8e Offload diagnostics serialization to the task pool 2024-08-07 16:43:51 +02:00
Lukas Wirth
bb60c21885 Slightly quieter fatal panics 2024-08-07 16:35:58 +02:00
Shoyu Vanilla
ec0f00fc03 Fix native diagnostics not working 2024-08-07 23:33:39 +09:00
bors
0e282fcd04 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
e3e31ce199 Fix unconfigured diagnostic being attached to the wrong file for modules 2024-08-07 15:07:09 +02:00
bors
4523657760 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
ffd28e6ee9 Fix cargo config get env parsing 2024-08-07 14:36:22 +02:00
Lukas Wirth
d2fe906a62 Remove unnecessary CfgFlag definition in project-model 2024-08-07 14:27:59 +02:00
bors
0c20faf1f3 Auto merge of #17809 - nicolas-guichard:index-vendored, r=Veykril
Include vendored crates in StaticIndex

`StaticIndex::compute` filters out modules from libraries. This makes an exceptions for vendored libraries, ie libraries actually defined inside the workspace being indexed.

This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041 In general StaticIndex is meant for code browsers, which likely want to index all visible source files.
2024-08-07 11:05:49 +00:00
bors
ee10731c31 Auto merge of #17813 - roife:fix-issue-17803, r=Veykril
fix: tyck for non-ADT types when searching refs for `Self` kw

See e0276dc5dd (r1389848845)

For ADTs, to handle `{error}` in generic args, we should to convert them to ADT for comparisons; for others, we can directly compare the types.
2024-08-07 06:34:46 +00:00
bors
ddcd66b6b0 Auto merge of #17818 - alibektas:hidden_rust_project_json, r=Veykril
Allow rust-project.json to be hidden

Closes #17816
2024-08-07 06:20:40 +00:00
Ali Bektas
2426649661 Allow rust-project.json to be hidden 2024-08-07 03:27:03 +02:00
roife
dc104b05cd fix: tyck for non-ADT types when searching refs for Self kw 2024-08-06 21:52:43 +08:00
Nicolas Guichard
6dcc4e34c2 Include vendored crates in StaticIndex
StaticIndex::compute filters out modules from libraries. This makes an
exceptions for vendored libraries, ie libraries actually defined inside
the workspace being indexed.

This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041
In general StaticIndex is meant for code browsers, which likely want to
index all visible source files.
2024-08-06 14:27:22 +02:00
bors
b23142209e Auto merge of #17745 - regexident:improve-crate-manifests, r=Veykril
Improve crate manifests, adding missing `[package.repository]` and `[package.description]` fields

As [discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Could.20we.20add.20repository.20url.20to.20.60ra_ap_.60.20crates.20on.20crates.2Eio.3F/near/455095161).

cc `@Veykril` `@lnicola`
2024-08-06 06:28:54 +00:00
bors
5fe545c87f Auto merge of #17805 - ShoyuVanilla:issue-17578, r=Veykril
fix: Panic in path transform with default type parameters

Fixes #17578
2024-08-06 06:14:36 +00:00
bors
199ce2e326 Auto merge of #128200 - estebank:normalize-whitespace, r=pnkfelix
Change output normalization logic to be linear against size of output

Modify the rendered output normalization routine to scan each character *once* and construct a `String` to be printed out to the terminal *once*, instead of using `String::replace` in a loop multiple times. The output doesn't change, but the time spent to prepare a diagnostic is now faster (or rather, closer to what it was before #127528).
2024-08-06 03:44:38 +00:00
bors
1554864202 Auto merge of #125558 - Amanieu:const-asm-type, r=lcnr
Tweak type inference for `const` operands in inline asm

Previously these would be treated like integer literals and default to `i32` if a type could not be determined. To allow for forward-compatibility with `str` constants in the future, this PR changes type inference to use an unbound type variable instead.

The actual type checking is deferred until after typeck where we still ensure that the final type for the `const` operand is an integer type.

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->
2024-08-06 01:20:43 +00:00
Vincent Esche
7dec7e92ea Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
Vincent Esche
624f2ead7b Unify package descriptions by adding references to "rust-analyzer"
With the lack of a README on the individually published library crates and the somewhat cryptic `ra_ap_` prefix it is hard to figure out where those crates belong to, so mentioning "rust-analyzer" feels like auseful hint there.
2024-08-06 00:25:02 +02:00
Vincent Esche
f8de86b308 Apply Veykril's change suggestions 2024-08-06 00:25:02 +02:00
Vincent Esche
e9ee0d4166 Replace "ra_ap_ide" with "ide (aka ra_ap_ide)" 2024-08-06 00:25:02 +02:00
Vincent Esche
0a45f6dc24 Fix spelling of "data structure" 2024-08-06 00:25:02 +02:00
Vincent Esche
ddb9686246 Fix spelling of "object-oriented" 2024-08-06 00:25:02 +02:00
Vincent Esche
07058a71d4 Fix obsolete repository URL in [package.repository] of rust-analyzer crate 2024-08-06 00:25:02 +02:00
Vincent Esche
6f329e6d5b Add repository URL for published crates' missing [package.repository] fields 2024-08-06 00:25:02 +02:00
Vincent Esche
b5b0f4bc5a Replace "TBD" with more helpful desciptions in published crates' [package.description] fields 2024-08-06 00:25:02 +02:00
Shoyu Vanilla
0241116462 fix: Panic in path transform with default type parameters 2024-08-06 04:24:40 +09:00
bors
4a99d795d0 Auto merge of #17802 - Veykril:arg-mismatch-no-ty-mismatch, r=Veykril
fix: Surpress type mismatches in calls with mismatched arg counts

These tend to get very noisy, hiding the actual problem.
2024-08-05 14:35:50 +00:00
bors
fd3c10d45b Auto merge of #17772 - Veykril:debug.ts, r=Veykril
internal: Reorganize debug.ts
2024-08-05 14:21:45 +00:00
Lukas Wirth
deddbbfa60 Surpress type mismatches in calls with mismatched arg counts 2024-08-05 16:15:28 +02:00
bors
ce73b7cba2 Auto merge of #17771 - Veykril:parallel-vfs-config, r=Veykril
internal: Load VFS config changes in parallel

Simple attempt to make some progress f or https://github.com/rust-lang/rust-analyzer/issues/17373
No clue if those atomic orderings are right, though I don't think they are really too relevant either.

A more complete fix would probably need to replace our `ProjectFolders` handling a bit.
2024-08-05 14:07:22 +00:00
Lukas Wirth
7e94f3fd3c Reorganize debug.ts 2024-08-05 16:06:25 +02:00
Lukas Wirth
e437db2483 Slightly optimize watch list in vfs 2024-08-05 15:56:23 +02:00
bors
25d9e05c03 Auto merge of #17791 - ShoyuVanilla:await-outside-of-async, r=Veykril
feat: Implement diagnostic for `await` outside of `async`

Closes #17781
2024-08-05 13:53:21 +00:00
bors
f62d7b9f11 Auto merge of #17775 - ShoyuVanilla:segregate-diags, r=Veykril
perf: Segregate syntax and semantic diagnostics

Closes #17731
2024-08-05 13:39:30 +00:00
Shoyu Vanilla
eea1e9b21f perf: Segregate syntax and semantic diagnostics 2024-08-05 22:12:47 +09:00
bors
8137e74f46 Auto merge of #17801 - Veykril:unbrick-metrics, r=Veykril
minor: Fix metrics not running

`@bors` r+
2024-08-05 13:01:07 +00:00
Lukas Wirth
2d15cdb9fc minor: Fix metrics not running 2024-08-05 14:59:27 +02:00
Shoyu Vanilla
8a51419a2d feat: Implement diagnostic for await outside of async 2024-08-05 21:47:57 +09:00
bors
fbed308ebe Auto merge of #17799 - Veykril:syntax-bridge, r=Veykril
Split out syntax-bridge into a separate crate

This functionality is not really tied to mbe macros, so imo it has no place in that crate.
2024-08-05 12:31:45 +00:00
bors
b4571d7c00 Auto merge of #17793 - jjoeldaniel:msvc-docs, r=Veykril
docs: add msvc note to manual

Added note for Windows users to have the latest MSVC to minimize setup issues.

Closes #4870
2024-08-05 12:17:25 +00:00
bors
bd722496bb Auto merge of #127095 - Oneirical:testiary-education, r=jieyouxu
Migrate `reproducible-build-2` and `stable-symbol-names` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Needs try-jobs.

try-job: x86_64-msvc
try-job: armhf-gnu
try-job: test-various
try-job: aarch64-apple
try-job: i686-msvc
try-job: x86_64-mingw
2024-08-05 12:16:05 +00:00