Commit graph

432 commits

Author SHA1 Message Date
Aleksey Kladov
a525e830a6 add new editing API, suitable for modifying several nodes at once 2019-09-25 17:57:12 +03:00
Florian Diebold
7bb6fdcf52 Upgrade Chalk again 2019-09-24 22:29:52 +02:00
Florian Diebold
6df9c4035a Upgrade Chalk 2019-09-23 20:36:15 +02:00
Florian Diebold
a61615c955 Upgrade Chalk
... and remove Ty::UnselectedProjection. It'll be handled differently.
2019-09-14 10:04:56 +02:00
bors[bot]
1140a83c1b
Merge #1806
1806: refactor(args): Switch to pico-args r=matklad a=Geobert

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1768

Co-authored-by: Geobert Quach <geobert@protonmail.com>
2019-09-10 17:37:21 +00:00
Aleksey Kladov
1c5800dee8 "Fix" mbe to work with decomposed tokens
We regressed $i * 2 where $i = 1 + 1, need to fix that!
2019-09-10 15:56:05 +03:00
Geobert Quach
4e94c46713 refactor(args): Switch to pico-args in ra_tools 2019-09-10 12:56:45 +01:00
Geobert Quach
735845d86e refactor(args): Switch to pico-args 2019-09-10 11:31:40 +01:00
Aleksey Kladov
e6aa577830 ⬆️ chalk 2019-09-09 22:15:23 +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
28df377759 add option to disable notify 2019-09-06 17:21:29 +03:00
Aleksey Kladov
82d4cc2e7b ⬆️ deps 2019-09-06 13:48:06 +03:00
kjeremy
b354cfdc6a cargo update 2019-09-05 10:10:53 -04:00
Florian Diebold
02f4718649 Upgrade Chalk 2019-09-04 13:04:01 +02:00
kjeremy
cb063a9b30 lsp-types 0.61.0 2019-09-03 10:50:39 -04:00
Aleksey Kladov
798dc2ca80 start GitHub pages 2019-09-02 14:42:23 +03:00
Aleksey Kladov
4b6bccb58c ⬆️ once_cell 2019-09-01 23:18:15 +03:00
Aleksey Kladov
983de30a56 inline thread-worker 2019-08-30 20:32:59 +03:00
Aleksey Kladov
7cc14a7596 ⬆️ lsp-server 2019-08-30 20:18:57 +03:00
Aleksey Kladov
72a3722470 move lsp-server to a separate repository 2019-08-30 17:24:11 +03:00
Aleksey Kladov
0f6c048ce1 ⬆️ insta 2019-08-29 17:04:01 +03:00
Aleksey Kladov
ee932d464b ⬆️ vfs 2019-08-25 13:13:08 +03:00
Aleksey Kladov
8213db5c04 ⬆️ salsa 2019-08-22 16:42:05 +03:00
Aleksey Kladov
77fa2ef96d disable clap's features 2019-08-22 15:57:48 +03:00
Aleksey Kladov
8844ed9697 switch to jod threads 2019-08-21 11:09:01 +03:00
bors[bot]
bdf16d1b67
Merge #1706 #1708
1706: Normalize line endings to Unix flavor on IO bounraries r=matklad a=matklad



1708: update yanked getrandom r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-20 16:56:24 +00:00
Aleksey Kladov
deba1fedfa ⬆️ rustc_lexer 2019-08-20 19:53:05 +03:00
Aleksey Kladov
bbeb07e5ca switch to upstream ra_vfs 2019-08-20 19:53:05 +03:00
Aleksey Kladov
6ea4184fd1 translate \n -> \r\n on the way out 2019-08-20 19:53:05 +03:00
Aleksey Kladov
f2d458760a update yanked getrandom 2019-08-20 19:28:40 +03:00
Aleksey Kladov
58e9d7ef6f replace heck with just ascii transformation 2019-08-19 15:08:36 +03:00
Aleksey Kladov
97a36c85a5 ⬆️ vfs 2019-08-19 13:21:34 +03:00
Aleksey Kladov
5633829a16 drop tera dependency 2019-08-19 11:42:39 +03:00
Aleksey Kladov
7d29cf1225 use quote! to generate syntax kinds 2019-08-19 11:02:04 +03:00
Aleksey Kladov
8cefdb5527 use quote! macro to generate grammar
We already use syn&quote elsewhere (transitively), so it make sense to
cut down on the number of technologies and get rid of tera
2019-08-18 23:11:08 +03:00
Aleksey Kladov
d545a5c75c deserialize grammar 2019-08-18 21:54:51 +03:00
Aleksey Kladov
229d7943d8 switch to new codegen 2019-08-18 21:44:24 +03:00
Aleksey Kladov
14fd9e72a7 add quote dep 2019-08-18 21:33:31 +03:00
Aleksey Kladov
64ecba4f15 update lsp 2019-08-17 22:21:59 +03:00
Aleksey Kladov
e751e4d8a3 Remove cpuprofile dependencies 2019-08-17 15:29:57 +03:00
Aleksey Kladov
42ae888629 ⬆️ deps 2019-08-17 13:53:02 +03:00
kjeremy
e6cabc535b Update deps 2019-08-15 22:36:17 -04:00
Aleksey Kladov
a99febd885 ⬆️ deps 2019-08-15 15:58:08 +03:00
Aleksey Kladov
1700541e00 switch to upstream salsa 2019-08-15 15:27:00 +03:00
Aleksey Kladov
343463c824 implement durability 2019-08-15 15:27:00 +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
Jeremy Kolb
f7bdf9d268 cargo update 2019-08-06 07:56:18 -04:00
Laurențiu Nicola
5153001889 Bump deps 2019-08-04 10:43:51 +03:00
kjeremy
8d2068cf32 Update insta to 0.9.0 and cargo update 2019-07-31 10:05:00 -04:00
Phil Ellison
e6113c0998 Add merge_match_arm assist, bump rowan to 0.6.1 2019-07-29 21:59:52 +01:00
kjeremy
3e6d60ce8d Update crossbeam to pull in new memoffset 2019-07-25 11:57:49 -04:00
Aleksey Kladov
2473cb6a5c switch to upstream unescape 2019-07-24 11:47:28 +03:00
Aleksey Kladov
c79eea9fc1 ⬆️ rowan 2019-07-24 11:28:53 +03:00
kjeremy
ce77291ca4 flexi_logger 0.14 2019-07-22 13:13:55 -04:00
Aleksey Kladov
1c764e5478 ⬆️ deps 2019-07-22 18:31:31 +03:00
Aleksey Kladov
75761c0e47 add rustc_lexer 2019-07-22 17:47:33 +03:00
Aleksey Kladov
c9cfd57eea switch to upstream rowan's API 2019-07-20 20:12:06 +03:00
Aleksey Kladov
d4a66166c0 switch to the upstream rowan 2019-07-19 14:15:01 +03:00
Aleksey Kladov
d402974aa0 migrate ra_syntax to the new rowan API 2019-07-19 13:16:24 +03:00
Jeremy A. Kolb
5e9198f809 jemallocator 0.3 2019-07-17 10:58:17 -04:00
kjeremy
1fcc002677 cargo update 2019-07-15 15:07:11 -04:00
Florian Diebold
c8284d8424 Switch to Chalk master, without fuel 2019-07-15 08:49:55 +02:00
Florian Diebold
e2bce9e7eb Cargo update, including updating Chalk 2019-07-14 18:22:47 +02:00
Shotaro Yamada
a426de60ad Remove unused dependencies 2019-07-09 00:28:00 +09:00
bors[bot]
5ce2b4819e Merge #1504
1504: Simplify LSP handlers r=matklad a=kjeremy

Takes advantage of protocol inheritance via composition and simplifies some responses via the `From`/`Into` traits.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-07-08 09:55:23 +00:00
bors[bot]
5b19825e37 Merge #1507
1507: Constify KnownName's r=matklad a=mominul

Closes #1503 

Co-authored-by: Muhammad Mominul Huque <mominul2082@gmail.com>
2019-07-08 08:29:19 +00:00
Jeremy Kolb
8d3d6d5a84 Update memchr 2019-07-07 17:42:24 -04:00
Muhammad Mominul Huque
012fec54dc
Constify KnownName's 2019-07-08 03:29:38 +06:00
Jeremy Kolb
9c6e93cd6c Simplify responses by using into() 2019-07-07 17:28:21 -04:00
Jeremy Kolb
3f44aaf363 use flatten branch of lsp-types 2019-07-07 14:13:13 -04:00
Jeremy Kolb
57607d6ee4 bump regex 2019-07-06 13:48:11 -04:00
Jeremy Kolb
b4c0c7f79c Symplify by using into() 2019-07-04 19:08:08 -04:00
Jeremy Kolb
5e4b7a4ee2 cargo update run 2019-07-04 17:52:22 -04:00
Jeremy Kolb
9bfdab7089 Update to lsp-types 0.58.0 2019-07-04 16:57:52 -04:00
Jeremy Kolb
1e7e7afb61 rand 0.7.0 2019-07-04 15:16:06 -04:00
Aleksey Kladov
18a1e092e9 Move memory usage statistics to ra_prof 2019-06-30 13:30:17 +03:00
Aleksey Kladov
d4e2a3b726 ⬆️ rowan
New rowan includes one more memory optimization: green nodes are
deduplicated within a single tree
2019-06-27 01:02:10 +03:00
Aleksey Kladov
fa55b72c54 move ra_prof dep where it belongs 2019-06-26 13:07:26 +03:00
Aleksey Kladov
d621533f15 add cpuprofile to ra_prof
Now, one can use `let _p = ra_prof::cpu_profiler()` to capture profile
of a block of code.

This is not an out of the box experience, as that relies on gperfools

See the docs on https://github.com/AtheMathmo/cpuprofiler for more!
2019-06-26 11:11:28 +03:00
kjeremy
f8f136e990 Bump cargo_metadata, ena, flexi_logger 2019-06-20 15:09:39 -04:00
Aleksey Kladov
889d72c2c8 ⬆️ ra_vfs 2019-06-19 12:40:59 +03:00
bors[bot]
1541b2d689 Merge #1409
1409: The Fall down of failures r=matklad a=mominul

😁
Replaced all the uses of `failure` crate with `std::error::Error`.

Closes #1400 
Depends on rust-analyzer/teraron#1

Co-authored-by: Muhammad Mominul Huque <mominul2082@gmail.com>
2019-06-16 19:58:33 +00:00
Muhammad Mominul Huque
d3e74bfd2c
Update teraron version 2019-06-17 00:07:31 +06:00
bors[bot]
b81caed43f Merge #1408
1408: Associated type basics & Deref support r=matklad a=flodiebold

This adds the necessary Chalk integration to handle associated types and uses it to implement support for `Deref` in the `*` operator and autoderef; so e.g. dot completions through an `Arc` work now.

It doesn't yet implement resolution of associated types in paths, though. Also, there's a big FIXME about handling variables in the solution we get from Chalk correctly.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-06-16 12:00:41 +00:00
Muhammad Mominul Huque
91510db6d8
Fall down of failures 2019-06-16 00:48:50 +06:00
Florian Diebold
49489dc20c Add basic infrastructure for assoc type projection 2019-06-15 18:21:23 +02:00
Aleksey Kladov
b0be4207d0 reuse AnalysisHost in batch analysis 2019-06-15 16:29:23 +03:00
Muhammad Mominul Huque
f032eeb05f
Get rid of failure: ra_batch ra_cli 2019-06-15 13:24:02 +06:00
Muhammad Mominul Huque
9709bd39ca
Get rid of failure: ra_lsp_server & ra_project_model 2019-06-15 02:42:56 +06:00
Muhammad Mominul Huque
a931fb1ef6
Get rid of failure: gen_lsp_server 2019-06-15 01:03:17 +06:00
Aleksey Kladov
fc2658b074 use salsa's LRU for syntax trees 2019-06-12 13:25:30 +03:00
bors[bot]
3f5f9f0560 Merge #1391
1391: rename tools -> ra_tools r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-10 22:49:51 +00:00
Aleksey Kladov
10d34532e3 rename tools -> ra_tools
This should help with caching on CI I hope (see .travis.yml
before_cache)
2019-06-11 01:47:37 +03:00
Aleksey Kladov
156b7ee842 use single version of either in hir 2019-06-11 01:26:20 +03:00
Aleksey Kladov
9d7cb8ce80 ⬆️ salsa 2019-06-07 09:44:28 +03:00
Aleksey Kladov
bab72fd18d ⬆️ deps 2019-06-05 22:49:42 +03:00
Aleksey Kladov
b3b096234a switch to panic-safe salsa 2019-06-04 13:30:07 +03:00
Aleksey Kladov
5264711b5d add couple of debug utils 2019-06-04 00:27:49 +03:00
Aleksey Kladov
97158f5c8a add built-in types to scopes 2019-05-30 15:03:58 +03:00
Aleksey Kladov
54f77ad68d switch to upstream salsa 2019-05-30 13:05:09 +03:00
Aleksey Kladov
18ed351747 ⬆️ parking_lot 2019-05-30 12:02:30 +03:00
Pascal Hertleif
43d5a49653
More clever highlighting, incl draft for structs 2019-05-27 11:26:35 +02:00
Edwin Cheng
c0dc14ba5a Add Either dep 2019-05-26 20:10:05 +08:00
kjeremy
60cdd95e17 cargo update 2019-05-23 15:15:35 -04:00
Laurențiu Nicola
f1ec88cc56 Improve highlighting of name refs 2019-05-23 15:31:35 +03:00
Laurențiu Nicola
444e52e519 Move NameRef classification logic out of reference_definition 2019-05-23 12:32:47 +03:00
Aleksey Kladov
6fed943bd2 better profilig 2019-05-22 00:00:58 +03:00
Florian Diebold
f613c48d2e Use fuel branch for Chalk
This makes sure we don't take too long in trait solving.
2019-05-21 20:40:29 +02:00
Aleksey Kladov
26463f189f publish gen_lsp_server 0.2 2019-05-21 18:57:33 +03:00
Aleksey Kladov
0efb5364c3 sort hash maps for tests 2019-05-21 14:14:31 +03:00
Aleksey Kladov
507c97a18c ⬆️ insta 2019-05-21 13:21:54 +03:00
Aleksey Kladov
e29a58995b ⬆️ text_unit 2019-05-15 19:19:05 +03:00
Jeremy Kolb
e2b3862c0b cargo update 2019-05-09 08:45:01 -04:00
Aleksey Kladov
1667b5cf52 switch to once_cell from lazy_static 2019-05-07 20:54:33 +03:00
Aleksey Kladov
cdca18de9a ⬆️ deps 2019-05-04 23:56:21 +03:00
Florian Diebold
0bcf47b22b Update Chalk 2019-05-04 18:18:30 +02:00
Florian Diebold
b9c0c2abb7 Chalk integration
- add proper canonicalization logic
 - add conversions from/to Chalk IR
2019-05-04 18:18:30 +02:00
Edwin Cheng
c55a2dbc1d Fix more bugs 2019-04-26 02:03:56 +08:00
Edwin Cheng
299d97b6d9 Add handling token seperator in mbe 2019-04-26 02:03:55 +08:00
kjeremy
61fe117ad8 Update some deps 2019-04-24 11:39:52 -04:00
Aleksey Kladov
7cc845e88d start structured editing API 2019-04-21 20:51:20 +03:00
Aleksey Kladov
47672726d8 ⬆️ lsp 2019-04-21 15:17:22 +03:00
Aleksey Kladov
fa12ed2b8f switch to official extend selection API 2019-04-21 12:13:48 +03:00
Aleksey Kladov
16256ee2c6 ⬆️ vfs 2019-04-17 12:34:25 +03:00
Aleksey Kladov
c4a5aa45dc add a couple of profiling points 2019-04-15 01:10:07 +03:00
Aleksey Kladov
0b3d407e98 ⬆️ vfs 2019-04-12 23:35:12 +03:00
Aleksey Kladov
faf526e021 migrate to untyped rowan 2019-04-09 10:26:51 +03:00
kjeremy
1af7ae506a Update deps 2019-04-05 10:14:02 -04:00
Edwin Cheng
c23408751c Add multi-byte token support in tkn tree to ast 2019-04-05 03:39:54 +08:00
bors[bot]
c083515eec Merge #1106
1106: ⬆️ salsa r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-04 07:03:18 +00:00
Aleksey Kladov
afd64756dd ⬆️ salsa 2019-04-04 10:02:53 +03:00
bors[bot]
c6c88070c4 Merge #1068
1068: profiling crate first draft r=matklad a=pasa

I've made this first draft for #961 
Could you look at it? Is this something what you are looking for?
It has lack of tests. I can't figure out how to test stderr output in rust right now. Do you have some clues?
Additionally I'm thinking about to implement procedural  macros to annotate methods with this profiler. Will it be helpful?



Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-04-03 09:09:11 +00:00
Sergey Parilin
b74449e995 Merge remote-tracking branch 'upstream/master' into issue961_profiling 2019-04-02 17:55:14 +03:00
Sergey Parilin
9b73f80959 PR issuse resolved 2019-04-02 17:52:04 +03:00
Aleksey Kladov
9e213385c9 switch to new rowan 2019-04-01 12:06:24 +03:00
Sergey Parilin
58224bc659 profiling crate first draft 2019-03-27 18:23:26 +03:00
Aleksey Kladov
e8477f3260 update salsa some more 2019-03-27 16:31:13 +03:00
Aleksey Kladov
3419fe297a ⬆️ salsa 2019-03-27 13:38:33 +03:00
Aleksey Kladov
274990bc83 ⬆️ vfs 2019-03-26 13:54:23 +03:00
Aleksey Kladov
65a5c6859f ⬆️ deps 2019-03-25 14:12:03 +03:00
Sergey Parilin
36cb58f76d structure moved to ra_ide_api
ra_ide_api_light removed completely
2019-03-25 11:41:21 +03:00
Wilco Kusee
497934a7b4 Disable fork feature for proptest 2019-03-23 08:57:07 +01:00
bors[bot]
15189bc724 Merge #1021
1021: Wasm dependencies r=matklad a=detrumi

As a first step towards running RA on WASM (see #1007), this tweaks the dependencies somewhat so that projects built using `wasm-pack` can use `ra_ide_api` as a dependency.

There were two problems:
- use of undeclared type or module `MmapInner`
This error occurred because of the `memmap` crate, as a dependency of `fst`
Solution: specify `default-features = false` for the `fst` package (see https://github.com/BurntSushi/fst/issues/70)

- use of undeclared type or module `imp`
This happened in the `wait-timeout` crate ([which uses `Command` under the hood](https://github.com/alexcrichton/wait-timeout/issues/18)), a dependency of `rusty-fork` which is a dependency of `proptest`.
Solution: move `proptest` to dev-dependencies and add `#[cfg(test)]` to the `test_utils` crate.
**Edit:** Oh, that causes trouble with resolving the import when running the tests. Hmm...

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-22 20:22:37 +00:00
Wilco Kusee
4e6d0933cc
Disable memmap feature in fst dependency 2019-03-22 21:22:03 +01:00
Wilco Kusee
58e77660de Move join_lines to ra_ide_api 2019-03-22 17:12:31 +01:00
Sergey Parilin
fda70badf8 line_index and line_index_utils moved to ra_ide_api 2019-03-22 15:24:43 +03:00
bors[bot]
b038832795 Merge #997
997: Improve filtering of file roots r=matklad a=vipentti

`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.

Relates to discussion in #869 

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-21 10:56:05 +00: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
Aleksey Kladov
b931a472c4 move extend selection from ra_ide_api_light to ra_ide_api 2019-03-20 23:52:55 +03:00
Ville Penttinen
e70e2361b6 Upgrade ra_vfs to use new Filtering
Currently this matches the previous filtering, meaning all roots are filtered
using the same rules.
2019-03-18 20:53:08 +02:00