aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cargo_watch
Commit message (Collapse)AuthorAgeFilesLines
* Better names for config structsAleksey Kladov2020-03-311-8/+6
|
* Fix the endless progress bar issueKirill Bulatov2020-03-301-0/+10
|
* Pull options outwardsAleksey Kladov2020-03-301-10/+3
|
* Fix race in the testsAleksey Kladov2020-03-301-1/+1
|
* Use automatic thread joining for cargo-watchAleksey Kladov2020-03-302-40/+9
|
* Merge #3632bors[bot]2020-03-231-21/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3632: ra_cargo_watch: log errors r=matklad a=Veetaha Until this moment we totally ignored all the errors from cargo process. Though this is still true, but we now try to log ones that are critical (i.e. misconfiguration errors and ignore compile errors). This fixes #3631, and gives us a better error message to more gracefully handle the #3265 ![image](https://user-images.githubusercontent.com/36276403/76958683-d7e1f080-6920-11ea-83d8-04561c11ccc4.png) Though I think that outputting this only to `Output` channel is not enough. We should somehow warn the user that he passed wrong arguments to `cargo-watch.args`. I didn't bother looking for how to do this now, but this PR at least gives us something. *cc* @kiljacken @matklad Co-authored-by: veetaha <[email protected]> Co-authored-by: Veetaha <[email protected]>
| * ra_cargo_watch: log exit code tooveetaha2020-03-221-1/+5
| |
| * Smol self-nitVeetaha2020-03-211-1/+1
| |
| * fix: typoveetaha2020-03-211-1/+1
| |
| * ra_cargo_watch: return Result<> from run_cargo(), and don't read stderr for nowveetaha2020-03-211-35/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As stated by matklad, reading the stderr should be done alngside with stdout via select() (or I guess poll()), there is no such implementation in stdlib, since it is quite low level and platform-dependent and it also requires quite a bit of unrelated code we don't use it for now. As referenced by bjorn3, there is an implementation of the needed read2() function in rustc compiletest. The better solution will be to extract this function to a separate crate in future: https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298
| * ra_cargo_watch: log more errorsveetaha2020-03-211-3/+16
| |
* | Only include machine-applicable suggestionsLaurențiu Nicola2020-03-222-40/+26
|/
* Use dyn-ref instead of impl to impact compile times the leastEmil Lauridsen2020-03-171-2/+2
|
* Support loading OUT_DIR from cargo check at launchEmil Lauridsen2020-03-171-79/+96
|
* Check all crates of the workspaceAleksey Kladov2020-03-131-0/+1
| | | | | | | | | Previously, if the root of the was was a real crate, only this crate was checked. Ideally, we might want some kind of config here (which might be just overriding the whole command), but `--workspace` is def a nicer default.
* Handle diagnostics with multiple primary spansEmil Lauridsen2020-03-1211-527/+554
|
* Correctly handle multi-line fixes from cargo/clippyEmil Lauridsen2020-03-125-30/+267
|
* Merge #3533bors[bot]2020-03-091-1/+1
|\ | | | | | | | | | | | | | | 3533: Updates insta to 0.15.0 and bumps console to 0.10.0 r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Updates insta to 0.15.0 and bumps console to 0.10.0kjeremy2020-03-091-1/+1
| |
* | Fix SelectionRange return typekjeremy2020-03-091-1/+1
|/
* lsp-types 0.72kjeremy2020-03-021-1/+1
|
* Remove unused dependenciesShotaro Yamada2020-02-271-3/+0
|
* Update lsp-typeskjeremy2020-02-261-1/+1
|
* Update versionsKirill Bulatov2020-02-181-6/+6
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-181-1/+1
|
* Update snapshot tests due to removed SuggestedFixEmil Lauridsen2020-02-037-39/+67
|
* Rework how we send diagnostics to client.Emil Lauridsen2020-02-032-138/+38
| | | | | | | | | | | | The previous way of sending from the thread pool suffered from stale diagnostics due to being canceled before we could clear the old ones. The key change is moving to sending diagnostics from the main loop thread, but doing all the hard work in the thread pool. This should provide the best of both worlds, with little to no of the downsides. This should hopefully fix a lot of issues, but we'll need testing in each individual issue to be sure.
* Prevent child cargo process from messing with our stdinAleksey Kladov2020-02-011-0/+1
| | | | | | | | By default, `spawn` inherits stderr/stdout/stderr of the parent process, and so, if child, for example does fcntl(O_NONBLOCK), weird stuff happens to us. Closes https://github.com/rust-analyzer/lsp-server/pull/10
* Change error output to make a bit more senseEmil Lauridsen2020-01-291-2/+6
|
* Parse cargo output a line at a time.Emil Lauridsen2020-01-292-5/+22
| | | | | | | | | | | | | | | | | | We previously used serde's stream deserializer to read json blobs from the cargo output. It has an issue though: If the deserializer encounters invalid input, it gets stuck reporting the same error again and again because it is unable to foward over the input until it reaches a new valid object. Reading a line at a time and manually deserializing fixes this issue, because cargo makes sure to only outpu one json blob per line, so should we encounter invalid input, we can just skip a line and continue. The main reason this would happen is stray printf-debugging in procedural macros, so we still report that an error occured, but we handle it gracefully now. Fixes #2935
* Merge #2924bors[bot]2020-01-281-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 2924: Modify ordering of drops in check watcher to only ever have one cargo r=matklad a=kiljacken Due to the way drops are ordered when assigning to a mutable variable we were launching a new cargo sub-process before letting the old one quite. By explicitly replacing the original watcher with a dummy first, we ensure it is dropped and the process is completed, before we start the new process. Co-authored-by: Emil Lauridsen <[email protected]>
| * Modify ordering of drops in check watcher to only ever have one cargoEmil Lauridsen2020-01-281-2/+4
| | | | | | | | | | | | | | | | | | Due to the way drops are ordered when assigning to a mutable variable we were launching a new cargo sub-process before letting the old one quite. By explicitly replacing the original watcher with a dummy first, we ensure it is dropped and the process is completed, before we start the new process.
* | Don't do check progress update for fresh cratesEmil Lauridsen2020-01-281-0/+8
|/
* Buffer reads from cargo check's stdoutLaurențiu Nicola2020-01-271-1/+4
|
* Move snaps to new naming schemeJeremy Kolb2020-01-267-0/+0
|
* Update cratesJeremy Kolb2020-01-261-1/+1
|
* Remove RWLock from check watcher.Emil Lauridsen2020-01-232-6/+5
| | | | | | | | | | | | | | @matklad mentioned this might be a good idea. So the general idea is that we don't really need the lock, as we can just clone the check watcher state when creating a snapshot. We can then use `Arc::get_mut` to get mutable access to the state from `WorldState` when needed. Running with this it seems to improve responsiveness a bit while cargo is running, but I have no hard numbers to prove it. In any case, a serialization point less is always better when we're trying to be responsive.
* Update crateskjeremy2020-01-221-1/+1
|
* Tweak naming slightlyEmil Lauridsen2020-01-151-5/+5
|
* Manage check state updates in main_loop to reduce lock contentionEmil Lauridsen2020-01-151-39/+35
|
* lsp-types 0.69.0Jeremy Kolb2020-01-151-1/+1
| | | | Stabilizes most proposed features
* Defer cargo check until after workspace loadEmil Lauridsen2020-01-131-2/+11
|
* Disable cargo checking in workspaces with no cargo projectsEmil Lauridsen2020-01-111-0/+6
|
* Fix unused import for windows in cargo_watch testEdwin Cheng2020-01-031-0/+2
|
* Update dependenciesJeremy Kolb2020-01-011-1/+1
|
* Disable cargo_watch snapshot tests on windowsEmil Lauridsen2020-01-011-0/+7
|
* Merge #2681bors[bot]2019-12-293-2/+307
|\ | | | | | | | | | | | | | | 2681: cargo-watcher: Resolve macro call site in more cases r=matklad a=kiljacken This resolves the actual macro call site in a few more cases, f.x. when a macro invokes `compile_error!` (I'm looking at you `ra_hir_def::path::__path`). Co-authored-by: Emil Lauridsen <[email protected]>
| * Add related information with original error siteEmil Lauridsen2019-12-293-1/+306
| |
| * Resolve macro call site in more casesEmil Lauridsen2019-12-291-1/+1
| |
* | Lowercase drive letters when getting paths from cargo checkEmil Lauridsen2019-12-292-2/+68
|/