Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

diagnostics and error highlighting run one step behind current state #150

Closed
bensherman opened this issue Nov 21, 2019 · 6 comments
Closed

Comments

@bensherman
Copy link

Something strange is happening and I can't quite work out why.

I am finding that the errors and correction of those errors is being displayed one step behind the state of the code.

I can take a simple hello world, cause an error in it, and save. No error appears. I can make a second error, save, and the first error appears. I correct the errors, save, and the second appears. I can make a whitespace change, save, and then everything returns to the correct state.

I've attached a gif that shows what this behavior looks like.

out

When I go into the debug console, I see rls sending / receiving info from the plugin, and the correct state alway appears one rls run later. I feel like this is an off by one somewhere, but don't know where to start looking.

I have cleared all preferences and am running a clean atom on MacOS 10.14.6.

% atom --version
Atom    : 1.41.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0
% apm ls --installed
Community Packages (2) /Users/bensherman/.atom/packages
├── [email protected]
└── [email protected]

No preferences have been set.

This behavior is constant, and has existed since I started using the plugin.

@bensherman
Copy link
Author

This plugin is otherwise amazing and makes it a joy to learn and use rust, I am happy to screenshare and poke at whatever you'd like to help get this fixed.

I have another mac I am going to try and replicate this on, I will post updates if I find anything different.

@alexheretic
Copy link
Member

I haven't done much testing myself on mac as I don't have one. I'll try to reproduce on a VM when I get some free time.

@bensherman
Copy link
Author

I figured out what's causing this, it's dropbox!

I do a lot of development across multiple machines and I have a ~/code/rust directory that is synced across boxes. It looks like if I am using atom inside that folder, the delay occurs. I moved off of it and the ide works like it supposed to!

I will dig into this a little more, but I assume it's an rls problem at this point, not one with the IDE.

@alexheretic
Copy link
Member

alexheretic commented Nov 27, 2019 via email

@bensherman
Copy link
Author

Another turn of events - I link ~/code to ~/Dropbox/code - it isn't dropbox that is doing this, it's the link.

This is how I tested it:

[~] % cd rust
[~/rust] % ls
pants
[~/rust] % cd ..
[~] % ln -s rust/pants
[~] % cd pants
[~/pants] (master #%)% atom .

The code in ~/pants acts poorly, the stuff in ~/rust/pants works!

@alexheretic
Copy link
Member

ide-rust has moved to using rust-analyzer instead of RLS.

I'll close this issue for now, please reopen if this still applies to the new stack.

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