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

false positive importing relative modules #313

Closed
gdkrmr opened this issue Nov 17, 2018 · 6 comments
Closed

false positive importing relative modules #313

gdkrmr opened this issue Nov 17, 2018 · 6 comments
Assignees

Comments

@gdkrmr
Copy link

gdkrmr commented Nov 17, 2018

LanguageServer does not find SubMod1 in t2.jl, it finds MyPkg though.

MyPkg
├── Manifest.toml
├── Project.toml
└── src
    ├── MyPkg.jl
    ├── t1.jl
    └── t2.jl

MyPkg.jl:

module MyPkg
g(x) = 2 + x
include("t1.jl")
include("t2.jl")
end

t1.jl:

module SubMod1
f(x) = x^2
end

t2.jl:

module SubMod2
import ...MyPkg
import ..SubMod1
f2(x) = MyPkg.g(x) * SubMod1.f(x)
end
@davidanthoff davidanthoff added this to the v0.5.0 milestone Nov 18, 2018
@ZacLN
Copy link
Contributor

ZacLN commented Nov 19, 2018

I can't replicate this.
a) is this in vscode
b) does it fail with all the code in a single file?

@gdkrmr
Copy link
Author

gdkrmr commented Nov 21, 2018

a) It is emacs and LanguageServer is run as:

using LanguageServer, Sockets, SymbolServer;
server = LanguageServer.LanguageServerInstance(
        stdin, stdout, false,
        "/path/to/MyPkg", "",
        Dict()
);
server.runlinter = true;
run(server);

b) When everything is in a single file everything looks fine.

@YcWung
Copy link

YcWung commented Nov 26, 2018

Then maybe it is a problem of lsp-julia. Do you use this version https://github.com/non-Jedi/lsp-julia ?

@gdkrmr
Copy link
Author

gdkrmr commented Nov 26, 2018

yes, latest master with some modifications for the new LanguageServer version (gdkrmr/lsp-julia#3 (comment)). The actual call script to start LanguageServer is in my previous comment.

@gdkrmr
Copy link
Author

gdkrmr commented Nov 26, 2018

Just thinking: it may be #316, because I never rand Pkg.dev("path/to/MyPkg"), I simply activated the environment.

@davidanthoff davidanthoff modified the milestones: v0.5.0, Backlog Dec 23, 2018
@davidanthoff
Copy link
Member

I'm moving this to the backlog. Not because it isn't a bug, but we need to ship eventually :)

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

No branches or pull requests

4 participants