Kirill Bulatov
2b9952625b
Normalize dashes in crate names
2020-02-05 11:53:54 +02:00
Michal Terepeta
d761435ba0
Remove the Default impl for SourceRoot
...
Let's be always explicit whether we create a library (i.e., an immutable
dependency) or a local `SourceRoot`, since it can have a large impact on
the validation performance in salsa. (we found it the hard way recently,
where the `Default` instance made it quite tricky to spot a bug)
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-08 19:42:27 +01:00
Vincent Rouillé
b437dca4bd
Run rustfmt with respect to Cargo.toml edition
2019-12-04 23:05:01 +01:00
Aleksey Kladov
f4b1fb1554
Reorder
2019-11-22 14:12:45 +03:00
Aleksey Kladov
0861ac061e
Cleanup errors
2019-11-22 14:08:18 +03:00
Aleksey Kladov
2c48fa087b
Add support for environment to CrateGraph
2019-11-22 13:57:25 +03:00
Metabaron
dae087656a
Fix unused import
2019-11-12 12:01:13 +01:00
Metabaron
53b9c1c8d8
return Error instead of panicking in from_cargo_metadata
2019-11-12 12:01:13 +01:00
Metabaron
b69738590c
Implement FromStr for enum Edition
2019-11-12 12:01:13 +01:00
Aleksey Kladov
3603d02134
Reexport relative_path from ra_db
2019-11-04 01:14:17 +03:00
Aleksey Kladov
6fba51c5fc
move crate_def_map tests to hir_def
2019-11-03 23:35:48 +03:00
Aleksey Kladov
abf2179c0b
Prepare SourceDatabase API for lazy file loading
2019-10-14 16:23:55 +03:00
Aleksey Kladov
ebca677180
reduce visibility
2019-10-11 11:37:54 +03:00
uHOOCCOOHu
d2ea776b8f
Enable CfgOptions test
for workspace crates
2019-10-03 02:28:02 +08:00
uHOOCCOOHu
b1ed887d81
Introduce ra_cfg to parse and evaluate CfgExpr
2019-10-03 02:28:02 +08:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
Aleksey Kladov
ef2b84ddf1
introduce hir debugging infra
...
This is to make debugging rust-analyzer easier.
The idea is that `dbg!(krate.debug(db))` will print the actual, fuzzy
crate name, instead of precise ID. Debug printing infra is a separate
thing, to make sure that the actual hir doesn't have access to global
information.
Do not use `.debug` for `log::` logging: debugging executes queries,
and might introduce unneded dependencies to the crate graph
2019-09-09 12:32:16 +03:00
Aleksey Kladov
9ae455ea52
make source_root API more abstract
2019-09-06 14:21:11 +03:00
Jeremy Kolb
6b4ec73b7e
Clippy changes
2019-07-04 23:00:00 -04:00
Jeremy Kolb
4ad9e986ad
Some clippy fixes for 1.36
2019-07-04 17:43:00 -04:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Aleksey Kladov
8109ebb101
Add SourceRoot::is_library, in preparation for salsa's durability
2019-06-24 12:35:07 +03:00
Aleksey Kladov
4fd8cfd6ad
replace todo with fixme
2019-03-23 11:07:09 +03:00
Aleksey Kladov
0d8d918656
add skeleton for macro-aware name resolutions
2019-03-17 12:46:13 +03:00
Florian Diebold
70839b7ef8
Make edition handling a bit nicer and allow specifying edition in crate_graph macro
2019-02-13 20:31:47 +01:00
Florian Diebold
d5ad38cbb8
Resolve 2015 style imports
2019-02-13 20:10:46 +01:00
Florian Diebold
3a9934e2c3
Keep track of crate edition
2019-02-13 20:10:46 +01:00
Florian Diebold
6964a88e8c
Add an ra_cli command that analyses all crates in the current workspace
...
... and prints various stats about how many expressions have a type etc.
2019-02-10 10:56:58 +01:00
Florian Diebold
ddbf43b630
Move crate graph generation to ra_project_model
2019-02-09 11:15:25 +01:00
Aleksey Kladov
12e3b4c70b
reformat the world
2019-02-08 14:49:43 +03:00
Aleksey Kladov
8cf092d5de
:arrow_up salsa
2019-01-25 15:16:50 +03:00
Aleksey Kladov
3ab1519cb2
Change ids strategy
...
this is a part of larghish hir refactoring which aims to
* replace per-source-root module trees with per crate trees
* switch from a monotyped DedId to type-specific ids
2019-01-24 13:29:19 +03:00
Aleksey Kladov
a2ca03d10b
⬆️ salsa
2019-01-17 14:11:00 +03:00
Aleksey Kladov
77f67ca7e2
gracefully handle cycles in crate graph
...
rust-lang/rust has absolutely weird setup with rustc-workspace-shim,
which leads to real cycles.
2019-01-13 13:39:48 +03:00
Marcus Klaas de Vries
0b8fbb4fad
Fix typos in ARCHITECTURE.md and a number of crates
...
specifically: gen_lsp_server, ra_arena, ra_cli, ra_db, ra_hir
2019-01-09 01:17:09 +01:00
bors[bot]
d77520fde3
Merge #310
...
310: When constructing a crate graph, detect and forbid cycles. r=matklad a=gfreezy
fixed #300
Co-authored-by: gfreezy <gfreezy@gmail.com>
2018-12-22 14:48:18 +00:00
gfreezy
c0add813e9
mark as visited on entry instead of left
2018-12-22 22:40:41 +08:00
gfreezy
0267df3815
not visit the same crateId only once
2018-12-22 15:30:58 +08:00
Aleksey Kladov
e086cc8db5
hide empty changes
2018-12-21 19:13:26 +03:00
gfreezy
66d15bb2da
add #[cfg(test)]
2018-12-21 22:45:38 +08:00
gfreezy
77eaa208ed
rename to dfs_find
2018-12-21 22:30:41 +08:00
gfreezy
792dabc0a6
When constructing a crate graph, detect and forbid cycles.
...
fixed #300
2018-12-21 22:27:04 +08:00
Aleksey Kladov
c96011833c
extend comment
2018-12-20 14:35:37 +03:00
Aleksey Kladov
bb2bafb606
docs for input queries
2018-12-20 14:12:47 +03:00
Aleksey Kladov
e6465e7e2a
index all local crates
2018-12-20 12:15:38 +03:00
Aleksey Kladov
85290bc134
switch analysis to vfs
2018-12-20 12:15:38 +03:00
Aleksey Kladov
b6ce7a6d34
make it compile
2018-12-20 12:15:38 +03:00
Aleksey Kladov
dea1a69e1c
remove relpath from input
2018-12-20 12:15:38 +03:00
Aleksey Kladov
cb6205c09d
use relpaths for module resolve
2018-12-20 12:15:38 +03:00
Aleksey Kladov
74fe581061
return dependencies with names
2018-12-09 13:33:16 +03:00