Lukas Wirth
ee10f9f5cd
Cleanup cfg and env handling in project-model
2024-04-19 10:41:08 +02:00
bors
1179c3ee83
Auto merge of #16639 - alibektas:13529/config_restruct, r=Veykril
...
internal : redesign rust-analyzer::config
This PR aims to cover the infrastructural requirements for the `rust-analyzer.toml` ( #13529 ) issue. This means, that
1. We no longer have a single config base. The once single `ConfigData` has been divided into 4 : A tree of `.ratoml` files, a set of configs coming from the client ( this is what was called before the `CrateData` except that now values do not default to anything when they are not defined) , a set of configs that will reflect what the contents of a `ratoml` file defined in user's config directory ( e.g `~/.config/rust-analyzer/.rust-analyzer.toml` and finally a tree root that is populated by default values only.
2. Configs have also been divided into 3 different blocks : `global` , `local` , `client`. The current status of a config may change until #13529 got merged.
Once again many thanks to `@cormacrelf` for doing all the serde work.
2024-04-16 07:52:07 +00:00
Lukas Wirth
531a270d91
Generally optimize diagnostics performance
2024-04-15 22:15:41 +02:00
Ali Bektas
67d8d2d4a0
Make ConfigData Ser and TOML De
...
This commit makes rust-analyzer::config module TOML ser and de.
Co-Authored-By: Cormac Relf <web@cormacrelf.net>
2024-04-15 14:14:23 +02:00
Lukas Wirth
a483d3bc37
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
2024-04-14 16:02:38 +02:00
Lukas Wirth
f3567bb604
Arc CrateData::cfg_options
2024-04-06 13:55:10 +02:00
Lukas Wirth
13890697eb
Simplify
2024-04-06 13:12:07 +02:00
Lukas Wirth
8e324e98a1
Rename ProcMacroKind::FuncLike to Bang
2024-03-22 11:20:56 +01:00
Lukas Wirth
cd8eb0fe6d
internal: Remove span trait
2024-03-21 20:08:30 +01:00
Lukas Wirth
255a8aef92
Move Edition into span crate
2024-03-21 10:21:44 +01:00
Laurențiu Nicola
717ba1d56a
Clippy fixes
2024-03-10 08:42:50 +02:00
Laurențiu Nicola
0f43b55e83
Stop using an Arc when setting the file text
2024-03-08 20:30:12 +02:00
Laurențiu Nicola
02b6c181dd
Compress file text using lz4 in salsa
2024-03-08 20:22:08 +02:00
Lukas Wirth
09d33f3e1e
Add diagnostics integrated benchmark
2024-03-07 09:33:48 +01:00
Lukas Wirth
4303e741de
Cleanup
2024-03-04 11:10:06 +01:00
Lukas Wirth
91554e0ae7
fix: Fix modules in blocks not resolving in ide layer
2024-02-26 14:54:47 +01:00
Lukas Wirth
ead369117a
CrateOrigin::Local means local to the project workspace, not cargo workspace
2024-02-16 16:28:17 +01:00
Lukas Wirth
0ccb3b8731
Move dedup-dev-deps tests into rust-analyzer crate
2024-02-16 15:47:40 +01:00
Lukas Wirth
b1404d387a
fix: Split toolchain and datalayout out of CrateData
2024-02-16 14:48:25 +01:00
tamasfe
6d45afd8d8
feat: ignored and disabled macro expansion
2024-02-12 12:50:40 +01:00
Tetsuharu Ohzeki
a9a315fd73
base-db: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Lukas Wirth
159a03ad7b
Move salsa fork in-tree
2024-02-07 16:29:46 +01: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
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Johann Hemmann
71d4dba960
redundant_pattern_matching
2024-01-19 17:31:01 +01:00
Johann Hemmann
3041164301
Temporarily allow all lints which occur
...
They will be removed one by one
2024-01-19 12:52:12 +01:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
c7eb52dd7b
internal: Add unstable config for loading the sysroot sources via cargo metadata
2024-01-15 09:59:32 +01:00
Lukas Wirth
b6e6d5d3af
internal: Consider all kinds of explicit private imports in find_path
2024-01-11 12:22:04 +01:00
Lukas Wirth
4d3a0dc329
Replace SourceRootCrates hashset output with slice for deterministic order
2024-01-10 14:51:51 +01:00
Lukas Wirth
06aaf20f10
Some minor perf improvements
2024-01-09 20:43:17 +01:00
Tetsuharu Ohzeki
efc87092b3
Use Cargo's [workspace.lints.*] to config clippy
2023-12-29 23:51:32 +09:00
bors
3ce35931db
Auto merge of #16178 - Veykril:builtin-fn-callsite, r=Veykril
...
fix: Fix span marking for builtin fn macros
2023-12-21 15:22:23 +00:00
Lukas Wirth
5bdb479131
fix: Fix span marking for builtin fn macros
2023-12-21 16:20:27 +01:00
bors
7bdf48ce37
Auto merge of #16165 - Veykril:meta-vars, r=Veykril
...
fix: Update metavariable expression implementation
Fixes https://github.com/rust-lang/rust-analyzer/issues/16154
This duplicates behavior of that before and after PR https://github.com/rust-lang/rust/pull/117050 based on the toolchain version. There are some 1.76 nightlies that are still broken (any before that PR basically) but fetching and storing the commit makes little sense to me (opposed to the toolchain version).
2023-12-20 10:30:58 +00:00
Lukas Wirth
f48ecb6e09
Try to support pre and post-change metavars
2023-12-19 20:45:12 +01:00
bors
0ed815faca
Auto merge of #16151 - lnicola:minimal-2024-edition, r=davidbarsky
...
internal: Add minimal support for the 2024 edition
CC #16146
2023-12-18 17:33:20 +00:00
Laurențiu Nicola
fec0e04fc2
Add minimal support for the 2024 edition
2023-12-18 17:10:20 +02: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
Lukas Wirth
4c45d23948
fix: Syntax fixup now removes subtrees with fake spans
2023-12-15 13:52:49 +01:00
Lukas Wirth
070cd4e8b0
minor: Add messages to some asserts for better debugging
2023-12-14 10:24:41 +01:00
Lukas Wirth
45d81048c9
internal: Bump salsa
2023-12-07 10:57:51 +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
Igor Matuszewski
a7224c998d
Don't explicitly warn against semicolon_in_expressions_from_macros
...
This has been warn-by-default for two years now and has already been
added to the future-incompat lints in 1.68.
2023-12-05 11:35:09 +01:00
Lukas Wirth
02a3a9438a
Some more minor cleanups
2023-12-02 17:04:13 +01:00
Lukas Wirth
d2a31acda1
Fix macro expansion expression parenthesis wrapping
2023-12-02 13:03:46 +01:00
Lukas Wirth
f48fa0c6cb
Re-implement syntax fixups
2023-11-29 16:00:39 +01:00