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

[BUG] Possible Method Call Error #4824

Closed
jmanthony3 opened this issue Sep 15, 2023 · 6 comments
Closed

[BUG] Possible Method Call Error #4824

jmanthony3 opened this issue Sep 15, 2023 · 6 comments

Comments

@jmanthony3
Copy link

Details

When editing a Julia script in VS Code, IntelliSense keeps complaining about a method call error on all plot and plot! commands throughout the script. Below is a simple example.
image

Which does successfully run and outputs a plot:
image

But why is IntelliSense complaining about the RecipesBase.plot function when all I did was using Plots; gr()?

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pythonplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots.jl version: Plots v1.39.0
Backend version (]st -m <backend(s)>): GR v0.72.8
Output of versioninfo():

Julia Version 1.9.3
Commit bed2cd540a (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
@jmanthony3 jmanthony3 added the bug label Sep 15, 2023
@BeastyBlacksmith
Copy link
Member

You really should report this in the vscode extension repository

@jmanthony3
Copy link
Author

But this message only appears on the plot and plot! commands loaded from the Plots package. I haven't seen this message with other packages: e.g. LinearAlgebra, Measurements, ProgressMeter, and SignalDecomposition.

@BeastyBlacksmith
Copy link
Member

BeastyBlacksmith commented Sep 18, 2023

Having a 0 method function to be extended by other modules is not too uncommon in the julia ecosystem, but I can see that its hard to check by static analysis. Either way this is a false positive of the linter and not something we can do about in Plots.jl.

@jmanthony3
Copy link
Author

I'll ignore it then. The code ran fine despite the messages. For what it's worth, I can't see the messages this morning because I can't establish a connection to the language server. So I guess I'll chase that down and then pop over to the VS Code extension as you suggested.

@jmanthony3
Copy link
Author

jmanthony3 commented Sep 19, 2023

@BeastyBlacksmith, it looks like you were right about the 0 method error not being uncommon: e.g. julia-vscode/julia-vscode#1218 (comment). I'm sorry for not doing more thorough research.

I did resolve my language server issue, and I still get the 0 method error on the plot and plot! commands...The code operates fine despite the messages. So I'll ignore it and hope that it works itself out. After using Julia for almost a year, the fact that this issue only popped up here recently implies that it would also soon go away?

@jmanthony3
Copy link
Author

To repeat the OP, the following screenshot demonstrates that the 0 method error still exists even using Julia v1.9.4 and the v1.65.2 of the VS Code extension.
image

However, what is exciting is that the next screenshot no longer shows the 0 method error with Julia v1.10.0!
image

So it seems that the issue has been resolved because moving to v1.10.0 brought with it a new language parser.

The versions of the Plots package and GR backend have not changed from the OP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants