Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

False positive compilation errors using Rust #939

Open
adrianboston opened this issue Jan 27, 2022 · 5 comments
Open

False positive compilation errors using Rust #939

adrianboston opened this issue Jan 27, 2022 · 5 comments

Comments

@adrianboston
Copy link

Issue Type: Bug

I get false positive compilation errors showing up in the "Problems" dropdown that seems to be an iterative real-time compile. Run/Debug works with no issue. Turning to terminal compiles with no errors.

It started very soon after adding unit tests into the source, using the #[test] pragma. Sometimes the error shows within commented code.

Prior to that, no issues.

Extension version: 0.7.8
VS Code version: Code 1.63.2 (Universal) (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
OS version: Darwin x64 17.7.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (32 x 2594)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 64.00GB (4.40GB free)
Process Argv --crash-reporter-id 3459ab68-b960-4433-b56f-adab7430e7a4
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dsc:30414009
pythonvs932:30410667
vscop804:30404766
vs360cf:30404996
vsrem710cf:30416617
vscexrecpromp3c:30407761

@lnicola
Copy link
Member

lnicola commented Jan 27, 2022

@adrianboston your report isn't actionable. You should include at least a screenshot, the problematic code and maybe a reduced copy of it, which someone can paste into Code to reproduce the problem.

Having said that, you should try https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer, see #927 for details. rust-analyzer too has false positive diagnostics and corner cases, but it is currently more actively maintained.

@adrianboston
Copy link
Author

It is not reproducible. False positive shows up; then disappear. Its m-m-m-magic. I will endeavour to post some very short code that displays this behaviour. It's currently part of a large proj. Im using this rust although it states powered by rust analyzer. I found it very stable.

@lnicola
Copy link
Member

lnicola commented Jan 27, 2022

Im using this rust although it states powered by rust analyzer.

It's not. It has an option for that, but it's been broken for one year and a half, I think.

I found it very stable.

It's all right if you like it, but the last commit in this repository is from February 2021. If you run into any issues, it's unlikely that they will be solved soon.

@adrianboston
Copy link
Author

adrianboston commented Jan 27, 2022

I found its nothing to do with particular code. The errors are one from a previous build. The error line number is sometimes within commented lines. The error and line number remains the same in the Problems area despite updates and changes.

A reboot of the window / project clears the window of the error, returning it to either a clean build or clear/refresh the Problem window.

Perhaps VS Code needs a "Clear" or "Refresh" facility by way of a button. Or a Trashcan symbol as found in terminal. That simply cleans, clears or refresh the last compilation.

@lnicola
Copy link
Member

lnicola commented Jan 28, 2022

I mean, it's still worth trying rust-analyzer, since it will replace RLS at some point in the future. Issues reported here are unlikely to be addressed.

Beware of some missing functionality, though: the biggest one is that in rust-analyzer most diagnostics are recomputed after you save a file and not while typing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants