Commit Graph

36 Commits

Author SHA1 Message Date
Aleksey Kladov
857f419c9d hard-code nightly-only CFGs 2019-10-08 14:43:29 +03:00
Aleksey Kladov
355419d404 use slightly more idiomatic api for cfg 2019-10-08 14:22:49 +03:00
oxalica
c6303d9fee
Use raw cfgs in json project and fix typo 2019-10-05 20:55:27 +08:00
uHOOCCOOHu
1067a1c5f6
Read default cfgs from rustc 2019-10-03 02:28:03 +08:00
uHOOCCOOHu
d2ea776b8f
Enable CfgOptions test for workspace crates 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
ivfranco
4854408f28 close #1763 2019-09-05 22:04:56 +08:00
Bastian Köcher
18c7a1ebe7 Make sysroot use RUST_SRC_PATH if set 2019-08-22 21:59:23 +02:00
Aleksey Kladov
7cd9b1dd7a don't load sysroot in most heavy tests 2019-08-19 15:41:18 +03:00
Aleksey Kladov
34203256bf introduce ra_vfs_glob crate
It manages exclusion rules for the vfs crate
2019-08-06 14:28:31 +02:00
Aleksey Kladov
6cf56b6615 cleanup imports 2019-08-06 10:57:16 +02:00
Aleksey Kladov
d751bd08bf cleanup 2019-08-06 10:57:16 +02:00
Aleksey Kladov
0e4a542cfb rename 2019-08-06 10:50:32 +02: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
6314e62cfb add analysis-bench to benchmark incremental analysis
Can be used like this:

```
$ cargo run --release -p ra_cli -- \
  analysis-bench ../chalk/ \
  --complete ../chalk/chalk-engine/src/logic.rs:94:0

loading: 225.970093ms

from scratch:   8.492373325s
no change:      445.265µs
trivial change: 95.631242ms
```

Or like this:

```
$ cargo run --release -p ra_cli -- \
  analysis-bench ../chalk/ \
  --highlight ../chalk/chalk-engine/src/logic.rs

loading: 209.873484ms

from scratch:   9.504916942s
no change:      7.731119ms
trivial change: 124.984039ms
```

"from scratch" includes initial analysis of the relevant bits of the
project

"no change" just asks the same question for the second time. It
measures overhead on assembling the answer outside of salsa.

"trivial change" doesn't do an actual salsa change, it just advances
the revision. This test how fast is salsa at validating things.
2019-06-16 19:45:05 +03:00
bors[bot]
257a15b939 Merge #1404
1404: Fight down failures! r=matklad a=mominul

issue #1400 

Now only `ra_tools` crate depends on `failure`, should I also fight those? 😁

Co-authored-by: Muhammad Mominul Huque <mominul2082@gmail.com>
2019-06-15 09:45:55 +00:00
Muhammad Mominul Huque
9709bd39ca
Get rid of failure: ra_lsp_server & ra_project_model 2019-06-15 02:42:56 +06:00
Florian Diebold
dafa177088 Add alloc -> core dependency 2019-06-13 21:59:50 +02:00
Alan Du
40424d4222 Fix clippy::identity_conversion 2019-06-04 18:05:07 -04:00
Alan Du
ed3d93b875 Fix clippy::single_char_pattern 2019-06-04 18:05:07 -04:00
Roberto Vidal
7c7cfc5f04 Sends cwd info for runnables and code lenses 2019-04-14 10:04:38 +02:00
Aleksey Kladov
4fd8cfd6ad replace todo with fixme 2019-03-23 11:07:09 +03:00
Ville Penttinen
c6d6e6c625 Move actual include logic to ProjectRoot
This way the two IncludeRustFiles implementations can simply call the
ProjectRoots' methods, so that the include logic is in one place.
2019-03-21 10:43:47 +02:00
Ville Penttinen
e32462c6d5 Improve filtering of file roots
`ProjectWorkspace::to_roots` now returns a new `ProjectRoot` which contains
information regarding whether or not the given path is part of the current
workspace or an external dependency. This information can then be used in
`ra_batch` and `ra_lsp_server` to implement more advanced filtering. This allows
us to filter some unnecessary folders from external dependencies such as tests,
examples and benches.
2019-03-20 11:55:38 +02:00
David Wood
614dd3c347
Rename and change add_roots to return a Vec. 2019-03-07 01:05:07 +01:00
David Wood
00d927a188
Initial implementation of project-lock.json.
This commit adds a initial implementation of project-lock.json, a build
system agnostic method of specifying the crate graph and roots.
2019-03-07 01:05:03 +01: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
3a9934e2c3 Keep track of crate edition 2019-02-13 20:10:46 +01:00
Pascal Hertleif
4fd3613434 Fix some typos 2019-02-12 15:02:57 +01:00
Florian Diebold
e91a46eb0c Clean up a bit 2019-02-09 11:15:25 +01:00
Florian Diebold
50fd860471 Remove Vfs from project model 2019-02-09 11:15:25 +01:00
Florian Diebold
12c70871cc Remove SmolStr from project model 2019-02-09 11:15:25 +01:00
Florian Diebold
ddbf43b630 Move crate graph generation to ra_project_model 2019-02-09 11:15:25 +01:00
Florian Diebold
fcd615e4b7 Extract project model to separate crate 2019-02-09 11:15:25 +01:00