Commit graph

1244 commits

Author SHA1 Message Date
Aleksey Kladov
d05790b947 Work around a bug
cc #288
2018-12-18 14:58:54 +03:00
bors[bot]
f3ea21ac16 Merge #286
286: move thread worker to a separate crate r=matklad a=matklad

Going to tackle https://github.com/rust-analyzer/rust-analyzer/issues/243, this is a refactoring towards that goal

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-18 09:54:56 +00:00
Aleksey Kladov
193992fd14 move thread worker to a separate crate 2018-12-18 12:52:17 +03:00
bors[bot]
4a1ab869b7 Merge #284
284: By default, log only to stderr, and not to disk. r=matklad a=eminence

This fixes a common problem when running under VS Code, the user doesn't have permissions to create a `log` directory in the CWD.

The old behavior can be re-enabled by setting `RA_INTERNAL_MODE=1`

Fixes #282

Co-authored-by: Andrew Chin <achin@eminence32.net>
2018-12-18 07:01:52 +00:00
Andrew Chin
8b1e667077 By default, log only to stderr, and not to disk.
This fixes a common problem when running under VS Code, the user
doesn't have permissions to create a `log` directory in the CWD.

The old behavior can be re-enabled by setting RA_INTERNAL_MODE=1
2018-12-17 17:22:30 -05:00
bors[bot]
fd22dbde20 Merge #283
283: Docs r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-17 21:15:42 +00:00
Aleksey Kladov
ee2dc9969f big picture 2018-12-18 00:13:50 +03:00
Aleksey Kladov
620970b06e docs about cancelation 2018-12-17 23:34:07 +03:00
Aleksey Kladov
00b71e668d update architecture.md 2018-12-17 23:23:44 +03:00
bors[bot]
1875aa024f Merge #280
280: Fixed cast expression parsing in ra_syntax. r=matklad a=ruabmbua

Fixes #279 
Related to https://github.com/rust-analyzer/rust-analyzer/pull/273

The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).

**Example:**

```rust
fn test() {
	6i8 as i32 + 5;
}
```

This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes the plus sign after path types as extra type bounds.

My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.

This function is then called by `type_()` and the new public `type_no_bounds()`.

Co-authored-by: Roland Ruckerbauer <roland.rucky@gmail.com>
2018-12-17 19:43:51 +00:00
Roland Ruckerbauer
d0f1334226 Fixed cast expression parsing in ra_syntax.
The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).

**Example:**

```rust
fn test() {
	6i8 as i32 + 5;
}
```

This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes all plus sign after path types as extra.

My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.

This function is then called by `type_()` and the new public `type_no_bounds()`.
2018-12-17 17:26:24 +01:00
Aleksey Kladov
8d42deeac3 fix installation on windows 2018-12-17 11:26:41 +03:00
bors[bot]
c5472f820b Merge #277
277: use new clear-terminal feature r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-15 19:35:49 +00:00
Aleksey Kladov
9cfd5ea2b4 use new clear-terminal feature 2018-12-15 22:33:35 +03:00
bors[bot]
0156a53808 Merge #276
276: Extract and rename AtomEdit and Edit into ra_text_edit r=matklad a=vemoo

As discused in #105



Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-12 07:52:38 +00:00
Bernardo
0527e3b283 rename Edit to TextEdit and AtomEdit to AtomTextEdit 2018-12-11 19:07:17 +01:00
Bernardo
7344d28768 extract AtomEdit and Edit into new ra_text_edit crate 2018-12-10 22:09:12 +01:00
bors[bot]
f655f993fe Merge #275
275: Update ARCHITECTURE.md r=matklad a=h-michael

I am still not familiar with the code base, so mostly I quote crate's comments.

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2018-12-10 14:28:33 +00:00
Hirokazu Hata
6d14bb0cd0 Update ARCHITECTURE.md 2018-12-10 23:07:07 +09:00
bors[bot]
038ae23b71 Merge #274
274: Add crates/*/target to gitignore r=matklad a=h-michael

I am using rls and rust-analyzer together.
Rls creates cache in `crates/*/target`, so I would like to add it to gitignore as well.

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2018-12-10 13:29:43 +00:00
Hirokazu Hata
04bb7879c8 Add crates/*/target to gitignore 2018-12-10 21:23:21 +09:00
bors[bot]
4b433d2c59 Merge #272
272: use \b as word boundary when expanding single word in comments r=matklad a=vemoo

as discused in #266 

Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-09 20:39:02 +00:00
Bernardo
a062d844c2 use \b as word boundary 2018-12-09 15:50:56 +01:00
bors[bot]
3725276554 Merge #271
271: Implement format hook r=matklad a=DJMcNab

Tentatively: fixes #155.

However, this does add all changes in staged files, which might not be desirable. However, I think we can't solve that without explicit support in rustfmt for it, so it should be fine.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-09 12:44:58 +00:00
DJMcNab
cbce28a348 Reimplement format-hook using a rust binary 2018-12-09 12:27:13 +00:00
Aleksey Kladov
b9c17a6001 Answer canceled requests 2018-12-09 14:43:02 +03:00
Aleksey Kladov
5004cb928b verbose assertions in SourceFileItems 2018-12-09 14:21:54 +03:00
bors[bot]
19f6cdcc03 Merge #268
268: WIP: resolve imports across crates r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-09 11:00:56 +00:00
Aleksey Kladov
7784c7a701 resolve extern crates propertly 2018-12-09 13:49:54 +03:00
DJMcNab
1e554d551f Fix alignment of .cargo/config 2018-12-09 10:41:42 +00:00
DJMcNab
279ff4927a Update hook to not add unstaged files 2018-12-09 10:37:04 +00:00
Aleksey Kladov
e89da32bb7 move tests to separate file 2018-12-09 13:33:16 +03:00
Aleksey Kladov
6a16d3fb0b WIP: resolve across crates 2018-12-09 13:33:16 +03:00
Aleksey Kladov
8b9ff46b37 make resolver fields private 2018-12-09 13:33:16 +03:00
Aleksey Kladov
74fe581061 return dependencies with names 2018-12-09 13:33:16 +03:00
Aleksey Kladov
961cae7e53 thread info about dep names 2018-12-09 13:33:16 +03:00
Aleksey Kladov
ca7e5905c1 more crate boilerplate 2018-12-09 13:33:16 +03:00
Aleksey Kladov
9c6c7ec2da hir::Crate boilerplate 2018-12-09 13:33:16 +03:00
Aleksey Kladov
9b1356464a propagate deps to CrateGraph 2018-12-09 13:33:16 +03:00
Aleksey Kladov
32c067f8c9 track deps in project model 2018-12-09 13:33:16 +03:00
Aleksey Kladov
34956b7823 remove direct dep on event-stream: malisious version was unpublished 2018-12-09 13:31:04 +03:00
DJMcNab
e823db0698 Implement and test format hook 2018-12-09 10:29:13 +00:00
bors[bot]
77b70fcfd4 Merge #270
270: Checks r=matklad a=matklad

I see occasional panics when binding sources. Hopefully this assertions will make it clear where do the panics come from/

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-09 10:22:13 +00:00
Aleksey Kladov
159525b120 Check Fileid in SourceFileMap 2018-12-09 13:18:46 +03:00
Aleksey Kladov
13100da7a2 switch threadpool back from rayon to threadpool
rayon does not replenish the pool when the thread panics, but we must
be reselient to bugs.
2018-12-09 13:13:36 +03:00
bors[bot]
904438e993 Merge #267
267: Fix the extend keybinding r=DJMcNab a=DJMcNab

Make the extend selection keybinding less annoying for users not used to Injelli-J (myself included). Also fixes a minor style issue and runs `npm update`.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-09 09:09:07 +00:00
DJMcNab
bb0c2eb8d9 Fix cargo format component name and run rustfmt 2018-12-09 09:08:10 +00:00
DJMcNab
12addc6233 Add package command and upgrade event-stream 2018-12-08 21:09:32 +00:00
DJMcNab
c54a7da6e0 Run npm update and add private and preview flags
Private stops npm publish working, which would be nonsensical anyway

In case it gets added to the vscode extension repository, preview marks it as such

Private may also prevent publishing to the vscode extension repository
2018-12-08 20:56:31 +00:00
DJMcNab
4dca5adb3c Remove uneeded characters 2018-12-08 20:52:30 +00:00