Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double indication of values used from opens_codelens causing view scrolling off-by-one erro #228

Open
canadaduane opened this issue Jan 13, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@canadaduane
Copy link

canadaduane commented Jan 13, 2019

When "Indicate what values have been used from an open" is checked in the settings (under Reason_language_server: Opens_codelens section of vs code settings) I get one line and one extra line in my code showing the values that the open adds to a file. The extra line seems to result in a miscalculation of how many lines are in the file, which results in (an annoying) off-by-one error that scrolls the view unnecessarily by one line whenever I type a key.

off-by-one

In case it helps, this is the Float module that I reference in the Utils parent module above:

module Float = {
  let (+) = (+.);
  let (-) = (-.);
  let ( * ) = ( *. );
  let (/) = (/.);
  let (~-) = (~-.);
};

This is what the off-by-one error does when editing the file (37 sec. video):
https://www.dropbox.com/s/tsp22oawsqubyfq/OffByOne.mp4?dl=0

(Each keypress, after a few hundred milleseconds debounce, results in the view scrolling by one line).

@jaredly
Copy link
Owner

jaredly commented Jan 15, 2019

Yeah, this happens when you have an error in your file, so analysis is temporarily disabled until the error is resolved. From your screenshot, you have an error on line one, and so the codelenses won't be correct.
But yeah the issue where it jumps the screen around is super annoying, and definitely needs to be fixed.

@jaredly jaredly added the bug Something isn't working label Jan 15, 2019
@canadaduane
Copy link
Author

This is slightly off topic, but the error on line 1 is "Unbound module Buckle" which seems odd to me. Probably my setup is wrong.

@canadaduane
Copy link
Author

I found that I needed to bsb -clean to get back to a working state (again, slightly off topic).

@donut
Copy link

donut commented May 13, 2019

This is really painful. Another video of the issue: https://www.rightthisminute.com/tools/jw/videos/atAB8f2x/play?force_hq=1

Running bsb -clean doesn't solve it for me. But restarting vscode every 15 minutes when this starts happening does let it work for a bit.

@donut
Copy link

donut commented May 20, 2019

It looks like VSCode's April 2019 update (v1.34) addresses this with "Stable CodeLens". I re-enabled code lens for reason-vscode and things are going smoothly so far. Never mind.

@farukg
Copy link

farukg commented Dec 5, 2019

@jaredly

Yeah, this happens when you have an error in your file, so analysis is temporarily disabled until the error is resolved.

i was searching for an issue i have, which you just described in that quote, i think. Is it possible to keep on showing codelens even if there is an error? cause thats actually the most needed time and all lenses are just shutdown :( If you wish, i file a separate issue for this, cause its not really related to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants