Closed roshanjames closed 11 years ago
This is related. Even after I delete the type t from M, the dropdown seems to show it. Is the user expected to hit rewind or refresh after edits?
On ven. 16/août 2013 (21:10), Roshan James wrote:
This is related. Even after I delete the type t from M, the dropdown seems to show it. Is the user expected to hit rewind or refresh after edits?
No it is not. When you edit, the function merlin-edit is called and retracts the merlin locked zone before the point. However I cannot reproduce your bug, on my computer it works well.
I reproduced the bug on my computer and just pushed a fix.
The problem was that emacs mode was not tracking modifications done to existing content in the buffer (merlin-lock-point is not enough, it only tells the position of the cursor on merlin-side, but merlin is not aware of modifications).
I was wrong, there was a bug in one merlin command hiding another synchronization problem… We will push a fix asap!
Do let me know when you are ready and I'll test at my end.
@def-lkb I pulled the latest and built. I think your synchronization patch seems good.
Here is an instance of auto-complete not working. The buffer is in the following form:
Note that it understands the submodule Pipe
However on a later line when when I try to auto-complete Pipe, it shows nothing:
I understand that errors like this may be hard to duplicate. So I am not how to give you enough information to debug this.
I tried one of two other modules that should be supplied by Async.Std (such as Udp). Even they don't seem to be auto-completing. Doing merlin-rewind also does not seem to help.
Update: Modules from Core.Std do seem to auto complete.
And fully qualifying Async.Std.Pipe also seems to work.
Update: I have filed Issue #77 about the the problem documented in this comment.
Here is another example of no auto-complete:
The module Snapshot is defined further up in the same file. Snapshot does have errors in it according to merlin, but these should not prevent merlin from showing some ac information. Here are the error locations:
That said, it is surprising that it does not seem to be understanding with sexp and bin_io. The error at that point says "Unbound type constructor t".
@roshanjames Any news?
Ok, this is exciting. I'll get back to you guys later today once I have had the chance to look at things.
On Sep 5, 2013, at 4:44 AM, Thomas Refis notifications@github.com wrote:
@roshanjames Any news?
— Reply to this email directly or view it on GitHub.
I think this issue is a repeat of other issues where I have asked for some debug information printing. This issue merely includes a specific example.
For following little file, sometimes I see completion results for the module M and sometime I dont. When I don't doing a merlin-rewind or a merlin-restart-process fixes it. However doing a merlin-to-point does not seem to flag any errors. Can we display something about the internal state of merlin in such cases to try and track down how it got into a bad state?
open Core.Std
module M = struct open Float
type t = int
let to_string = to_string end
let _ = M.{M-/}