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

LanguageServer does not index active project/package #988

Open
fredrikekre opened this issue Oct 8, 2021 · 5 comments
Open

LanguageServer does not index active project/package #988

fredrikekre opened this issue Oct 8, 2021 · 5 comments
Labels

Comments

@fredrikekre
Copy link
Member

fredrikekre commented Oct 8, 2021

For example, in the root of the Example.jl repo when editiing a file foo.jl using Example gives "Missing reference" and same with functions defined within Example.

@Roger-luo
Copy link

I believe this in dup of julia-vscode/julia-vscode#800 and #498 is a try to fix it but it seems not having any progress yet

@fredrikekre
Copy link
Member Author

Just leaving some breadcrumbs for when I (or someone else) have time to look at this again:

if isdir(joinpath(parent_workspaceFolder, "test")) && startswith(doc._path, joinpath(parent_workspaceFolder, "test"))
# We're in the test folder, add the project iteself to the deps
# This should actually point to the live code (e.g. the relevant EXPR or Scope)?
haskey(folder_proj, "name") && push!(project_deps, Symbol(folder_proj["name"]))
for extra in keys(get(folder_proj, "extras", []))
if Symbol(extra) in keys(symbols)
push!(project_deps, Symbol(extra))
end
end
end
looks like it is supposed to handle this (but just for files in test/), but this never works since the package itself is not indexed in the SymbolServer. (It does work if you coerce Pkg to add the package to itself, but then you get the cloud-indexed symbols and not the live ones).

@jarbus
Copy link

jarbus commented Jan 17, 2023

Jesus I thought I was going insane. Experiencing this behavior too, it's really counter-intuitive.

@PetrKryslUCSD
Copy link

This really makes LSP useless for package development. I get so many missing refs that it is really hard to find real problems in there. https://discourse.julialang.org/t/lsp-missing-reference-woes/98231/8

@qiyang-ustc
Copy link

Several years has been passed... Looking forward any updates...

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

No branches or pull requests

6 participants