# Eglot or language server: why "Possible method call error"?

**URL:** https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879
**Category:** Tooling
**Tags:** languageserver, eglot
**Created:** [February 7, 2024, 2:50pm UTC](https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879 "2024-02-07T14:50:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ryofurue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ryofurue/32/24531_2.png) [@ryofurue](https://discourse.julialang.org/u/ryofurue)
#### Post date: [February 7, 2024, 2:50pm UTC](https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879/1 "2024-02-07T14:50:53Z")

</div>

Recently, I started to have a lot of green wiggly lines on emacs. For example,

```julia
function read_seq_rec(ist, type::DataType)
  header = read(ist, Int32)
  buffer = read(ist, type)
  trailer = read(ist, Int32)
  return header, trailer, buffer
end

```

See the screenshot below, too. I’ve looked at the messages and they are all

```julia
[IncorrectCallArgs]: Possible method call error.

```

I don’t think `read(iostream, datatype)` is a method call error.

These days, green squiggly lines are too prevalent to be useful. When I started to use Julia (version 1.6), green squiggly lines were really useful. I’m now on Julia 1.10. Does somebody know what’s going on?

![image](https://global.discourse-cdn.com/julialang/original/3X/c/a/cac2f331fab79be76996a0fcddd1efef5135db60.png)

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [February 7, 2024, 2:57pm UTC](https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879/2 "2024-02-07T14:57:23Z")

</div>

I can’t reproduce this with Neovim.

> [@ryofurue](#):
>
> These days, green squiggly lines are too prevalent to be useful.

This is a frequent complaint but I never have false positives. I wonder what’s different.

---

<div class="post-metadata">

### Author: ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)
#### Post date: [February 7, 2024, 4:48pm UTC](https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879/3 "2024-02-07T16:48:19Z")

</div>

Can’t reproduce either with eglot:

![Screenshot_2024-02-07_17-41-57](https://global.discourse-cdn.com/julialang/original/3X/a/6/a6adb960c7c2735a3dd7340f05c08332e8a8caed.png)

Maybe your LS version is out-of-date? See e.g. here for a way to upgrade

> [@Is it normal for the Julia language server to take ~20 s to start up?](https://discourse.julialang.org/t/is-it-normal-for-the-julia-language-server-to-take-20-s-to-start-up/109683/12):
>
> Yes, please try upgrading. Either do this Or upgrade in place (no change needed in you configuration in this case): shell$ cd /home/tokujin/.emacs.d/elpa/eglot-jl-20230601.1335/ shell$ julia --project=. -e 'import Pkg; Pkg.update()' (I’ve copied the correct path from your eglot output above)

You’ll need to adapt the path to your specific case. You can find the correct path using one of the following methods:

- M-x`eglot-stderr-buffer` then you’ll find the correct path at the beginning of the output, or
- C-hv`eglot-jl-language-server-project`

---

<div class="post-metadata">

### Author: ![ryofurue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ryofurue/32/24531_2.png) [@ryofurue](https://discourse.julialang.org/u/ryofurue)
#### Post date: [February 9, 2024, 4:55am UTC](https://discourse.julialang.org/t/eglot-or-language-server-why-possible-method-call-error/109879/4 "2024-02-09T04:55:39Z")

</div>

Thank you all for your inputs!

@ffevotte The other thread you quote provides the solution. Specifically,

```sh
shell$ cd ~/.emacs.d/elpa/eglot-jl-20230601.1335/
shell$ julia --project=. -e 'import Pkg; Pkg.update()'

```

fixed my problem.

I shared the `elpa` directory among my machines via cloud drive, which may have caused this problem. I’ve now moved the `.emacs.d` directory to each machine, sharing only the `init.el` file via cloud.

I hope the problem is gone for good.
