Commit graph

3468 commits

Author SHA1 Message Date
bors[bot]
5a6a3d0777 Merge #1027
1027: remove obsolete diagnostic r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 13:32:42 +00:00
Aleksey Kladov
46a21b07e6 remove obsolete diagnostic 2019-03-23 16:31:11 +03:00
bors[bot]
bce55c749a Merge #1026
1026: rename persistent hir database -> def database r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 12:44:47 +00:00
Aleksey Kladov
3f0cf6ebe1 rename persistent hir database -> def database 2019-03-23 15:44:24 +03:00
bors[bot]
331220fee2 Merge #1025
1025: Disable fork feature for proptest r=matklad a=detrumi



Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-23 12:09:07 +00:00
Wilco Kusee
0c15deac76 Move typing to ra_ide_api 2019-03-23 12:11:46 +01:00
Aleksey Kladov
d99abe4c25 document work list 2019-03-23 12:56:47 +03:00
bors[bot]
3d7a330f32 Merge #990
990: Forbid TODO markers on master branch r=matklad a=matklad

this makes TODO markers useful for things which you want to fix before sending a PR

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 08:07:30 +00:00
Aleksey Kladov
4fd8cfd6ad replace todo with fixme 2019-03-23 11:07:09 +03:00
Wilco Kusee
497934a7b4 Disable fork feature for proptest 2019-03-23 08:57:07 +01:00
Aleksey Kladov
2394a2ee35 forbid todo markers 2019-03-23 10:53:28 +03: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
bors[bot]
3604f23e98 Merge #1012
1012: Move join_lines and test_utils to ra_ide_api r=matklad a=detrumi

Part of #1009 

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-22 17:56:23 +00:00
Wilco Kusee
01bca7114c Simplify changes and fix tests 2019-03-22 17:12:32 +01:00
Wilco Kusee
9bd8336c51 Remove LocalEdit usage 2019-03-22 17:12:32 +01:00
Wilco Kusee
58e77660de Move join_lines to ra_ide_api 2019-03-22 17:12:31 +01:00
bors[bot]
6e324d38d6 Merge #1016
1016: Move folding_ranges to ra_ide_api r=pasa a=pasa

folding_ranges part of #1009 

Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-03-22 13:57:07 +00:00
Sergey Parilin
47c501bcfb Move folding_ranges to ra_ide_api 2019-03-22 16:31:21 +03:00
bors[bot]
708a7d24c5 Merge #1017
1017: line_index and line_index_utils moved to ra_ide_api r=matklad a=pasa

line_index and line_index_utils for issue #1009 

Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-03-22 12:38:59 +00:00
bors[bot]
6bc09e2ff8 Merge #1015
1015: Change primitive integers to have signedness and bitness r=matklad a=yanchith

Fixes #1004 

This creates enums: `Signedness`, `IntBitness` and `FloatBitness`, and condenses `UintTy` with `IntTy`, making use of the created enums. `FloatTy` is also changed from an enum into a struct containing `FloatBitness`.

`UncertainIntTy` and `UncertainFloatTy` now look much more similar.

`Ord` was removed from the types because `{u,i}size` aren't easily orderable with the rest. Fortunately this wasn't depended on anywhere.

Co-authored-by: yanchith <yanchi.toth@gmail.com>
2019-03-22 12:27:54 +00:00
Sergey Parilin
fda70badf8 line_index and line_index_utils moved to ra_ide_api 2019-03-22 15:24:43 +03:00
yanchith
504c8c7c2e Refactor primitive types into more orthogonal representation 2019-03-22 10:09:35 +01:00
bors[bot]
2a6544f906 Merge #1013
1013: Fuzz reparsing and fix found bugs r=matklad a=pcpthm

Add fuzz test for reparsing which:
- Checks reparsing doesn't panic and validate result syntax tree.
- Checks that incremental reparsing produces the same syntax tree as full reparse.
- Check for that errors are the same as full reparsing is disabled because errors are less important than syntax tree and produce failures which I couldn't figure out how to fix immediately (FIXME comment).

I guess the current input generation is inefficient but still found several bugs:
- Arithmetic overflow (negative result on an unsigned type). I changed the signature of `SyntaxError::add_offset` to solve this problem.
- When reparsing a leaf, the token of the leaf can be joined to the next characters. Such case was not considered.
- UNDERSCORE token was not produced when text length is exactly 1 (not a reparsing bug).
- When reparsing a block, *inner* curly braces should be balanced. i.e. `{}{}` is invalid.
- Effects of deleting newlines were not considered.

Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-22 05:48:55 +00:00
bors[bot]
ed823cb38d Merge #1014
1014: Don't execute cargo watch when information message is dismissed r=matklad a=pcpthm

I think most information messages on `VSCode` have such behavior.

Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-22 05:39:55 +00:00
bors[bot]
9c6c6a7cb5 Merge #988
988: Consolidate Ty variants into a new variant Ty::Apply r=matklad a=flodiebold

This gets us a lot closer to Chalk. It also introduces a lot of boilerplate, though, especially when matching :/ A lot of this can probably be refactored to be nicer, though.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-03-22 05:32:48 +00:00
pcpthm
1529eeb1b3 Don't execute cargo watch when popup is dismissed 2019-03-22 09:38:48 +09:00
pcpthm
bf8e7930da Fix reparsing failure when removing newline 2019-03-22 08:09:11 +09:00
pcpthm
edbc18516d Fix reparsing bug on "{}{}" 2019-03-22 08:09:11 +09:00
pcpthm
7669113e7c Completely ignore errors for reparse fuzz 2019-03-22 08:09:11 +09:00
pcpthm
c60ec02d75 Use template text to improve reparse fuzzing 2019-03-22 08:09:11 +09:00
pcpthm
ec59d9bda5 Fix lexer not producing right token on "_" 2019-03-22 08:09:11 +09:00
pcpthm
9623e77d9f Fix reparsing bug when lex result is different 2019-03-22 08:09:11 +09:00
pcpthm
c622000413 Improve reparse fuzz test 2019-03-22 08:09:11 +09:00
pcpthm
0acb61a911 Fix an arithmetic overflow in reparser 2019-03-22 08:09:11 +09:00
pcpthm
4c7142d0c9 Add fuzz test for reparsing 2019-03-22 08:04:48 +09:00
pcpthm
e734190c24 Refactor parser fuzz testing 2019-03-22 08:04:48 +09:00
Florian Diebold
1ee779d1f7 Assert in apply_substs that the number of parameters doesn't change
... and fix a small bug revealed by that.
2019-03-21 22:39:31 +01:00
Florian Diebold
cbb418ebb8 Rename name field to ctor as well 2019-03-21 22:29:12 +01:00
Florian Diebold
97be0e6c46 Some more doc comments 2019-03-21 22:23:52 +01:00
Florian Diebold
f10f5a81b3 TypeName => TypeCtor 2019-03-21 22:20:03 +01:00
Florian Diebold
8a5fbf4713 Remove the old variants replaced by Ty::Apply 2019-03-21 22:17:00 +01:00
Florian Diebold
7a8ba53542 Add Ty::Apply 2019-03-21 22:11:53 +01:00
Florian Diebold
bc7752e527 Represent FnPtr and Tuple using Substs 2019-03-21 22:11:53 +01:00
bors[bot]
51323a852a Merge #1011
1011: cleanup r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-21 16:43:52 +00:00
Aleksey Kladov
1b58e3e410 cleanup 2019-03-21 19:21:58 +03:00
Aleksey Kladov
7cae9ddeeb move diagnostics to ide_api 2019-03-21 19:08:54 +03:00
bors[bot]
48472f55c3 Merge #1010
1010: Change enableCargoWatchOnStartup to have three states r=matklad a=vipentti

This fixes #1005.

Defaults to `ask` which prompts users each time whether to start `cargo watch`
or not. `enabled` always starts `cargo watch` and `disabled` does not.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-21 12:04:47 +00:00
Ville Penttinen
5c3e9c716e Change enableCargoWatchOnStartup to have three states
This fixes #1005.

Defaults to `ask` which prompts users each time whether to start `cargo watch`
or not. `enabled` always starts `cargo watch` and `disabled` does not.
2019-03-21 13:56:25 +02:00
bors[bot]
aa0cc0c609 Merge #1002
1002: Fill partial fields r=matklad a=c410-f3r

Fixes #992 

Co-authored-by: Caio <c410.f3r@gmail.com>
2019-03-21 11:03:15 +00:00