Aleksey Kladov
700210d8b4
remove debug prints
2021-07-19 16:38:36 +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
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
Kirill Bulatov
339448157c
Only prefill caches in the completion benchmark
2021-06-11 09:27:25 +03:00
Kirill Bulatov
b24f816c0d
Fix visibility issues
2021-06-11 02:00:05 +03:00
Kirill Bulatov
ba65d259de
Prime caches on workspace load
2021-06-11 02:00:03 +03:00
Florian Diebold
d174b919dc
Enable attribute macro expansion in analysis-stats
...
Before:
```
> $ rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs .
Database loaded: 19.08s, 277minstr
crates: 34, mods: 688, decls: 13202, fns: 10412
Item Collection: 16.21s, 76ginstr
exprs: 290580, ??ty: 2508 (0%), ?ty: 1814 (0%), !ty: 947
Inference: 27.46s, 108ginstr
Total: 43.67s, 184ginstr
```
After:
```
> $ ./target/release/rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs .
Database loaded: 1.09s, 277minstr
crates: 34, mods: 688, decls: 14790, fns: 11006
Item Collection: 18.20s, 78ginstr
exprs: 297826, ??ty: 493 (0%), ?ty: 558 (0%), !ty: 342
Inference: 28.34s, 111ginstr
Total: 46.54s, 190ginstr
```
2021-06-05 11:29:24 +02:00
Aleksey Kladov
186c5c47cb
feat: avoid checking the whole project during initial loading
2021-04-12 15:29:31 +03:00
Edwin Cheng
877521325f
Fix ProcMacroClient dropped too early in cli
2021-03-02 13:14:05 +08:00
Vincent Esche
1a44168260
Split pub fn cargo_load
into pub fn load_workspace_at
and pub fn load_workspace
2021-02-16 16:37:52 +01:00
Florian Diebold
a7387cae2c
Fix slow tests sometimes failing
...
In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.
2021-02-12 16:31:16 +01:00
Vincent Esche
8f461ffe8f
Consolidate fn load_cargo(…)
parameters into struct LoadCargoConfig { … }
2021-02-08 11:30:16 +01:00
Vincent Esche
6d9c13c710
Add config: &CargoConfig
parameter to fn load_cargo(…)
2021-02-08 11:00:55 +01:00
Edwin Cheng
9358eecc04
Async Loading outdir and proc-macro
2021-01-29 01:04:14 +08:00
Aleksey Kladov
2870e70163
Add config option to ignore directories
2021-01-26 16:45:54 +03:00
Aleksey Kladov
add87f5424
Avoid blocking the main loop when editing Cargo.toml
...
I've noticed a bunch of "main loop too long" warnings in console when
typing in Cargo.toml. Profiling showed that the culprit is `rustc
--print cfg` call.
I moved it to the background project loading phase, where it belongs.
This highlighted a problem: we generally use single `cfg`, while it
really should be per crate.
2021-01-18 14:52:12 +03:00
Edwin Cheng
2b2d699b35
Report progress for cargo metadata and output-dir
2021-01-08 01:18:58 +08:00
Jonas Schievink
6857989f6f
Fix "no value set for FileTextQuery(FileId(..))"
2020-12-09 17:30:46 +01:00
Jonas Schievink
2b2318e695
Remove dummy ProcMacroClient in favor of Option
2020-12-07 17:16:50 +01:00
Aleksey Kladov
4dfda64b39
Cleanup workspace loading a tiny bit
2020-11-13 17:38:26 +01:00
Igor Aleksanov
19cce08662
Re-export base_db from ide_db
2020-10-24 11:39:57 +03:00
Aleksey Kladov
8716c4cec3
Move ide::AnalysisChange -> base_db::Change
...
This seems like a better factoring logically; ideally, clients shouldn't touch
`set_` methods of the database directly. Additionally, I think this
should remove the unfortunate duplication in fixture code.
2020-10-02 16:45:08 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Aleksey Kladov
ed20a857f4
Rename ra_db -> base_db
2020-08-13 16:29:33 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
2fd25e2d98
reduce visibility
2020-06-26 11:29:27 +02:00
Aleksey Kladov
72fb712dff
Add new module for project loading stuff
2020-06-26 00:27:57 +02:00
Aleksey Kladov
5a184fe855
Unify style
2020-06-25 09:00:33 +02:00
Aleksey Kladov
6937bcb67d
Less error-prone naming
2020-06-24 16:59:15 +02:00
Aleksey Kladov
e6c61d5072
Cleanup project.json deserialization
2020-06-24 16:16:52 +02:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
Aleksey Kladov
dad1333b48
New VFS
2020-06-23 17:51:06 +02:00
Aleksey Kladov
663ce0e99d
Remove dead code
2020-06-11 13:34:09 +02:00
Aleksey Kladov
27ebe5d33e
Reduce OUT_DIR special casing
2020-06-10 12:08:35 +02:00
Paul Daniel Faria
9c35f135b9
Remove default_cfg_options, pass target instead so it can be used for building cargo workspaces
2020-06-08 10:23:29 -04:00
Paul Daniel Faria
3937b225e7
Change management of test cfg to better support json projects
2020-06-07 10:29:03 -04:00
Aleksey Kladov
8baa4c5d07
Groundwork for specifying the set of projects via config
2020-06-03 12:22:01 +02:00
Aleksey Kladov
03a76191a1
Rename ProjectRoot -> ProjectManifest
2020-06-03 12:05:50 +02:00
Pavan Kumar Sunkara
9f0a7eb97b
Make some stuff public so that they can be reused by other tools
2020-05-14 11:14:46 +02:00
Christophe MASSOLIN
14dde99627
Pass cargo.target to rustc
2020-05-05 18:15:13 +02:00
veetaha
d3019164dc
ra_proc_macro: cleanups here and there
2020-04-20 21:37:02 +03:00
bors[bot]
f8016b8194
Merge #3996
...
3996: Fix path for proc-macro in nightly / stable release r=matklad a=edwin0cheng
I messed up that I forget we use different executable names for nightly / stable release, I changed to use the current executable name instead.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-17 09:31:57 +00:00
Edwin Cheng
ef6ee16006
Fix path for proc-macro in nightly / stable build
2020-04-17 04:45:03 +08:00
bors[bot]
8d296be109
Merge #3995
...
3995: Separate project discovery from project loading r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-16 20:36:19 +00:00
Aleksey Kladov
422ae477ce
Unmix error handling when discovering workspaces
...
Hitting an io::Error is a legit problem. Finding more than one
Cargo.toml is not.
2020-04-16 22:35:50 +02:00
Aleksey Kladov
be2654b0ed
Decouple project loading from project discovery a bit
2020-04-16 22:02:10 +02:00
Edwin Cheng
177becea98
Add proc-macro cli command for rust-analyzer
2020-04-16 21:13:57 +08:00