Linter highlights missing references in Project.toml file

Sometimes the Julia VS Code linter highlights missing references in the Project.toml file (screenshot below). I’ve seen this before but never got around to reporting or asking about it. Has anyone else seen this? Is there a way to fix this?

Are you sure it is the linter? I never had this issue. Which version of the Julia VSCode plugin do you have?

This definitely looks like the Julia linter:

The Julia extension auto-updates. I’m on the latest version, v1.127.2.

Maybe there’s a weird linter interaction with a different extension.

I get this too from time to time. I can’t find a reproducible set of steps to make it happen. Sorry! Restarting the language server usually straightens things out.

1 Like

Actually, question – are you seeing this behavior when your Workplace directory is the parent directory of the package with the Project.toml? I usually (only?) see this behavior in a monorepo, and I’ve wondered if the .jl in the folder name tricks the linter into thinking the Project.toml path contains a .jl extension pattern.

No, in my case the workspace directory in VS Code is the package directory, i.e. the Foo.jl directory, not the parent directory of that directory.

I guess I’ll open a Github issue.

I’ve got the same issue. It’s an incredibly simple structure:

project_root/
├─ script.jl
├─ Manifest.toml
├─ Project.toml
├─ test/
│  ├─ ... some random data files ...

But then I’m getting 700+ “Missing Reference” errors in Manifest.toml.

I’m using Julia 1.11 and the latest VSCode, Version: 1.95.2, with v1.127.2
of the Julia extension.

Do you mind linking the GitHub issue you opened so I could follow it?