# "Julia \[IncorrectCallArgs\]: Possible Method Call Error" in Emacs after Julia 1.10 Update

**URL:** <https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113>\
**Category:** General Usage\
**Tags:** emacs\
**Created:** [December 27, 2023, 9:41pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113 "2023-12-27T21:41:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsani63](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehsani63/32/38199_2.png) [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Post date:** [December 27, 2023, 9:41pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/1 "2023-12-27T21:41:39Z")

</div>

I’ve just updated to Julia 1.10 and have encountered an issue in Emacs (version 30) using `eglot` and `eglot-jl`. Specifically, I’m receiving flymake messages stating “Julia [IncorrectCallArgs]: Possible method call error” on several lines of my code, for example in all `include` expressions. This wasn’t an issue in previous versions of Julia, and I’m trying to figure out what might be causing it.

My Emacs configuration for Julia is as follows:

```julia
(use-package eglot-jl
  :straight t)

(use-package julia-ts-mode
  :straight t
  :mode "\\.jl$"
 :interpreter ("julia" . julia-mode)
 :init (setenv "JULIA_NUM_THREADS" "4")
 :config
 (add-hook 'julia-mode-hook 'eglot-jl-init)
 (add-hook 'julia-mode-hook 'eglot-ensure)
 (add-hook 'julia-mode-hook (lambda () (setq julia-repl-set-terminal-backend 'vterm)))
 (add-hook 'julia-mode-hook #'julia-formatter-mode))

;; Julia Formatter
(use-package julia-formatter
  :straight (julia-formatter :type git :host codeberg :repo "FelipeLema/julia-formatter.el"
                             :files ("julia-formatter.el"
                                     "toml-respects-json.el"
                                     "formatter_service.jl"
                                     "Manifest.toml" "Project.toml")))

(setq eglot-connect-timeout 1000)

```

I’m curious if anyone else has encountered similar issues after the Julia 1.10 update, especially when using Emacs. Any insights or suggestions on how to resolve or mitigate this issue would be greatly appreciated.

Thank you for your help and advice!

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 27, 2023, 9:53pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/2 "2023-12-27T21:53:40Z")

</div>

Could you post the full error message?

---

<div class="post-metadata">

**Author:** ![ehsani63](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehsani63/32/38199_2.png) [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Post date:** [December 27, 2023, 9:57pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/3 "2023-12-27T21:57:42Z")

</div>

It is exactly what I wrote. Here is a snapshot.

 ![Screenshot from 2023-12-27 22-55-33](https://global.discourse-cdn.com/julialang/original/3X/f/3/f3fa5b56631a3e477be5afc58109778f2fbd2f86.png)

---

<div class="post-metadata">

**Author:** ![ehsani63](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehsani63/32/38199_2.png) [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Post date:** [December 28, 2023, 10:19am UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/4 "2023-12-28T10:19:14Z")

</div>

Could the source of the problem be the new parser in Julia 1.10? I checked the eglot events log, and here is what I observed:

When running Julia 1.10, I get the following:

```julia
[jsonrpc] e[10:57:53.817] <-- textDocument/publishDiagnostics
{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///scratch/ehsan/projects/COS/src/COS.jl","version":0,"diagnostics":
[
{"range":{"start":{"line":9,"character":0},"end":{"line":9,"character":25}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},
{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":25}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},
{"range":{"start":{"line":11,"character":0},"end":{"line":11,"character":26}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."}
]},"jsonrpc":"2.0"}

```

Conversely, when running Julia 1.9.4, I receive:

```julia
[jsonrpc] e[10:56:32.048] <-- textDocument/publishDiagnostics 
{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///scratch/ehsan/projects/COS/src/COS.jl","version":0,"diagnostics":[]},"jsonrpc":"2.0"}

```

In the case of Julia 1.10, the three messages correspond to three `include` calls in my file. After checking other files, it appears that these messages often occur when dealing with strings.

---

<div class="post-metadata">

**Author:** ![dmolina](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmolina/32/5246_2.png) [@dmolina](https://discourse.julialang.org/u/dmolina)\
**Post date:** [January 8, 2024, 7:49pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/5 "2024-01-08T19:49:57Z")

</div>

It is the same for me. Actually I do not know if it happened with previous versions, but it is happen me with code as simple as:

```julia
a = "hola"
println(a)

```

It gives me in line 2:

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

I am using `eglot` and `eglot-jl` also, with a smaller configuration.

---

<div class="post-metadata">

**Author:** ![ehsani63](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehsani63/32/38199_2.png) [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Post date:** [January 8, 2024, 8:11pm UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/6 "2024-01-08T20:11:37Z")

</div>

Today I updated Julia packages in the eglot-jl folder, and the problem is resolved now.

---

<div class="post-metadata">

**Author:** ![johannesnauta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johannesnauta/32/47434_2.png) [@johannesnauta](https://discourse.julialang.org/u/johannesnauta)\
**Post date:** [January 17, 2024, 9:53am UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/7 "2024-01-17T09:53:23Z")

</div>

I had the same problem, and going into the `~/.emacs.d/elpa/eglot-jl-20230601.1335` and running `julia --project`, and then `] update` appears to have resolved the problem. I did also have to re-run `eglot-jl-init`.

---

<div class="post-metadata">

**Author:** ![ehsani63](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehsani63/32/38199_2.png) [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Post date:** [January 17, 2024, 11:30am UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113/8 "2024-01-17T11:30:00Z")

</div>

That is exactly what I did. It didn’t work right after v1.10 release, but after recent commits to `SymbolServer.jl`, the issue has been resolved.
