Lukas Wirth
66ec636fec
Highlight namerefs by syntax until proc-macros have been loaded
2022-08-29 18:44:55 +02:00
Lukas Wirth
950de7c3c3
Use --keep-going
cargo flag when building build scripts
2022-08-09 14:31:17 +02:00
Lukas Wirth
6a1737242b
Don't switch workspace on vfs file changes from libraries
...
When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.
2022-08-05 12:06:42 +02:00
bors
0fe3bcfd35
Auto merge of #12808 - Veykril:check-workspace, r=Veykril
...
feat: Only flycheck workspace that belongs to saved file
Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038
There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
2022-08-04 12:57:04 +00:00
Lukas Wirth
a8a6c160be
Use an empty expander for ignored non-attribute proc-macros
2022-08-03 18:10:15 +02:00
Lukas Wirth
c8ff70e924
fix: Fix server panicking on project loading when proc-macros are disabled
2022-07-26 16:30:45 +02:00
Amos Wenger
b1e3daf14b
Find standalone proc-macro-srv on windows too
2022-07-26 12:28:59 +02:00
Amos Wenger
74a2fad5e6
Gate and rename binary, use it if it's in the sysroot
2022-07-25 16:22:39 +02:00
Amos Wenger
dadb83282d
Remember the difference between 'sysroot root' and 'sysroot src root', start looking in there for a rust-analyzer-proc-macro-srv binary
2022-07-25 16:07:41 +02:00
Lukas Wirth
50b27e57ba
Better error messages when the proc-macro-server fails to start
2022-07-23 20:24:01 +02:00
Lukas Wirth
aeb07745d5
Spawn a proc-macro-srv instance per workspace
2022-07-23 20:10:10 +02:00
Lukas Wirth
25391e6d44
Only clear diagnostics of workspaces who have been flychecked
2022-07-20 11:49:36 +02:00
Jonas Schievink
ec1142c0d0
Improve file watcher config
2022-07-18 17:50:56 +02:00
Florian Diebold
8b3ec12aac
fix: Report proc macro errors in expressions correctly as well
...
They didn't have a krate before, resulting in the generic "proc macro
not found" error.
Also improve error messages a bit more.
2022-06-28 10:43:22 +02:00
Lukas Wirth
7d51fc4640
Show proc-macro loading errors in unresolved-proc-macro diagnostics
2022-06-15 17:34:01 +02:00
Lukas Wirth
664a751f2b
fix: Clear proc-macro changed flag when reloading workspace
2022-06-15 14:29:13 +02:00
Lukas Wirth
10e9f47dce
fix: Pass the build data to rustc_private crates
2022-06-12 19:29:45 +02:00
DQ
f3a5475082
Keep the other is
in reload.rs
docs
2022-05-23 10:29:03 +02:00
DQ
914ff6a395
Fix typo in new reload.rs
docs
...
Just skimmed today's changelog and came across the repetition
2022-05-23 09:35:32 +02:00
Aleksey Kladov
cbdab0e647
internal: document overall approach to reload
2022-05-21 13:11:05 +01:00
Jonas Schievink
3e356c1fd3
Clear cargo check
diagnostics when flycheck is turned off
2022-05-20 15:07:55 +02:00
Jonas Schievink
b2779111b4
simplify
2022-05-19 15:29:35 +02:00
Laurențiu Nicola
97cdf3eb0e
Try not to invalidate our state when the proc macro preference didn't change
2022-05-06 09:49:03 +03:00
bors
9e10d4b717
Auto merge of #12093 - nico-abram:uwu, r=Veykril
...
Reload project on .cargo/config[.toml] changes
Fixes #11024
Not adding tests as discussed in the issue
2022-05-02 12:21:42 +00:00
Justin Tracey
cfa7204544
small typo in log message
2022-04-29 05:59:32 +00:00
unknown
b373e62f1a
Reload project on .cargo/config[.toml] changes
...
Fixes #11024
2022-04-27 12:10:43 -03:00
Edwin Cheng
72fcc66835
More visibility for switch workspaces and its states
2022-04-18 14:26:00 +08:00
Aleksey Kladov
3f4235d59b
internal: more visibility into why things happen
2022-04-16 13:17:27 +01:00
Lukas Wirth
b23b276310
internal: Show more project building errors to the user
2022-04-14 11:31:01 +02:00
Lukas Wirth
dd4b53402d
Regenrate docs and package.json
2022-01-06 13:50:24 +01:00
Lukas Wirth
aecf26d09b
feat: Add config to replace specific proc-macros with dummy expanders
2022-01-06 13:50:18 +01:00
Aleksey Kladov
b9417f3483
feat: correctly fallback to notify if the clinet-side file watching is not supported
2022-01-01 17:26:54 +03:00
Lukas Wirth
1d80302b76
Set server status to warning when proc-macro sources change
2021-10-30 14:49:32 +02:00
Milo
35e5daacc3
more clippy fixes
2021-10-16 12:32:55 +01:00
bors[bot]
bcf0072bb4
Merge #10199
...
10199: fix: Fix Cargo.toml change detection r=lnicola a=lnicola
Maybe fixes #9546
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-09-13 18:14:20 +00:00
Laurențiu Nicola
4d7a3bb5c7
Shuffle code around to avoid an allocation
2021-09-13 21:06:31 +03:00
Jonas Schievink
e241015a75
Rename is_member
to is_local
2021-09-07 17:29:58 +02:00
Aleksey Kladov
81602f8a5d
internal: reduce coupling
...
tt is a data structure, data structures cant' go wrong, they shouldn't
have the knowledge that the world outside of them has all kinds of
errors.
2021-08-31 19:14:33 +03:00
Aleksey Kladov
d8a3d6f378
internal: cleanup proc macro server error handlig
...
When dealing with proc macros, there are two very different kinds of
errors:
* first, usual errors of "proc macro panicked on this particular input"
* second, the proc macro server might day if the user, eg, kills it
First kind of errors are expected and are a normal output, while the
second kind are genuine IO-errors.
For this reason, we use a curious nested result here: `Result<Result<T,
E1>, E2>` pattern, which is 100% inspired by http://sled.rs/errors.html
2021-08-31 19:01:39 +03:00
Aleksey Kladov
722a2a4690
minor: improve readability
...
naming, layout & comments help!
2021-08-31 15:46:00 +03:00
Aleksey Kladov
9e0203bd69
internal: make scheduling control flow more obvious
...
There should be only one place where we need to check if we want to
start background activities.
2021-08-30 19:39:08 +03:00
Dezhi Wu
ba0947dded
switch log
crate to tracing
2021-08-30 15:11:42 +08:00
Jonas Schievink
0ff2c81bb9
Fix reporting of build script errors
2021-08-25 17:56:39 +02:00
Jonas Schievink
095df7bc39
Don't fetch build script output twice
2021-08-25 17:56:24 +02:00
Aleksey Kladov
e86388689f
internal: remove unreasonable crate dependency
...
Proc macro expansion shouldn't know about salsa at all.
2021-08-22 14:05:12 +03:00
Aleksey Kladov
881d71a489
internal: reduce crate interdependence
...
I don't think there's anything wrong with project_model depending on
proc_macro_api directly -- fundamentally, both are about gluing our pure
data model to the messy outside world.
However, it's easy enough to avoid the dependency, so why not.
As an additional consideration, `proc_macro_api` now pulls in `base_db`.
project_model should definitely not depend on that!
2021-08-22 13:32:00 +03:00
Aleksey Kladov
410679285b
internal: prepare to track changes to mem_docs
2021-07-26 20:17:10 +03:00
Aleksey Kladov
b8b166e674
fix: potential bugs when build scripts do not match the current project
2021-07-18 13:13:03 +03:00
Aleksey Kladov
f4de2ece0d
internal: simplify handling of the build scripts
2021-07-18 11:29:22 +03:00
Aleksey Kladov
8d8c26e6f5
internal: a bit more of cwd safety for flycheck
2021-07-17 18:13:35 +03:00