# "Missing reference" warnings with Julia in VS Code?

**URL:** <https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321>\
**Category:** New to Julia\
**Created:** [November 20, 2019, 6:15pm UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321 "2019-11-20T18:15:36Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![j-adel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-adel/32/207882_2.png) [@j-adel](https://discourse.julialang.org/u/j-adel)\
**Post date:** [March 28, 2024, 11:15am UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321/21 "2024-03-28T11:15:34Z")

</div>

You mean having a `Project.toml`? That does indeed work for me and it is the obvious solution. I just think the linter should take into consideration the global environment when that is in fact what is being used.

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [March 28, 2024, 1:21pm UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321/22 "2024-03-28T13:21:14Z")

</div>

I can replicate the issues you’re seeing using the language server in emacs via eglot-jl. Notably, I made sure to wait until the symbol server had loaded all packages installed to my global environment and am still seeing the lint error. I believe this used to work, and I’m not immediately seeing any relevant issues in the issue tracker(s), so I’d definitely open an issue for this against LanguageServer.jl.

---

<div class="post-metadata">

**Author:** ![j-adel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-adel/32/207882_2.png) [@j-adel](https://discourse.julialang.org/u/j-adel)\
**Post date:** [March 28, 2024, 1:29pm UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321/23 "2024-03-28T13:29:12Z")

</div>

Alright, will do. Thanks a lot for the confirmation 😃

---

<div class="post-metadata">

**Author:** ![nharr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nharr/32/24698_2.png) [@nharr](https://discourse.julialang.org/u/nharr)\
**Post date:** [April 1, 2024, 8:53am UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321/24 "2024-04-01T08:53:50Z")

</div>

Your solution makes sense but I haven’t managed to get it to work. I also have a package that I use from scripts in their own directory, and this is what I’ve done:

1. navigate to “scripts” directory
2. `activate .` to activate current directory as environment
3. `dev ..`, which adds the Project.toml file with my package under its [deps]
4. restart the language server

The package is still a “Missing reference”. Is there a simple step I’ve missed?

Edit: I got it to work. My workspaces weren’t switching right.

---

<div class="post-metadata">

**Author:** ![j-adel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-adel/32/207882_2.png) [@j-adel](https://discourse.julialang.org/u/j-adel)\
**Post date:** [May 18, 2024, 3:05pm UTC](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321/25 "2024-05-18T15:05:44Z")

</div>

No one has replied to this [issue](https://github.com/julia-vscode/LanguageServer.jl/issues/1276) yet. I’ve now started encountering it with a fully set-up environment. Do you know if this is the same as this [issue](https://github.com/julia-vscode/LanguageServer.jl/issues/391) from back in 2019? I’ve disabled the warning but the problem is the linter doesn’t recognize any of the functions used from the package.

[Previous page](https://discourse.julialang.org/t/missing-reference-warnings-with-julia-in-vs-code/31321.md?page=1)
