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

Unable to run dutyl with DCD >= v0.8.0 #26

Open
andrewbenton opened this issue Mar 26, 2016 · 13 comments
Open

Unable to run dutyl with DCD >= v0.8.0 #26

andrewbenton opened this issue Mar 26, 2016 · 13 comments

Comments

@andrewbenton
Copy link

I am using the most recent version of vim-dutyl and I can try any version of DCD >= 0.8.0. dcd-server and dcd-client seem to still run on the command line, but not in vim. It might be related to the unix socket vs tcp socket. I can still use dutyl with DCD v0.7.5.

@andrewbenton
Copy link
Author

It seems that if I launch dcd-server externally with dcd-server --tcp --port 9166 ... and then add --tcp --port 9166 to the args in runDCDOnBuffer it works again.

@idanarye
Copy link
Owner

I've upgraded to 0.8.0 in my machine it Dutyl works fine. What error are you seeing?

@andrewbenton
Copy link
Author

I'm not seeing any errors. The problem is that I'm not seeing any completion either.

@idanarye
Copy link
Owner

Does :DUjump work? It's just an easier-to-debug feature, so if it doesn't work I prefer to start looking for the problem from there...

@andrewbenton
Copy link
Author

:DUjump doesn't work either. I get the error Unable to find declaration for symbolwriteln`.

The file that I'm testing on has

import std.stdio;

void func() { writeln("Hello again!"); }

void main()
{
    writeln("Hello, world!");
    func();
}

When I do :DUjump on writeln it gets that unable to find error, when I do it on func(), I get a no tags file error.

@idanarye
Copy link
Owner

DCD is not using tags, so I guess that the first DUjump makes dcd-server crash and the second one recognizes there is no DCD server running and reverts to Dscanner. If you re-run the DCD server(with :DUDCDrestartServer) and tries it on func() first you'll get an unable to find error.

What happens when you try to find writeln from the command line(after you run dcd-server with Dutyl)?

@andrewbenton
Copy link
Author

I don't think the server has crashed. On the command line, I'm able to do dcd-client --query and get a positive response back.

@idanarye
Copy link
Owner

dcd-client --query is not very interesting. What happens when you run this:

dcd-client --search writeln < [path-to-your-source-file]

@andrewbenton
Copy link
Author

I might have found the problem. I haven't been launching DCD through dutyl. I've been launching it through systemd. When dcd switched over from defaulting to TCP to defaulting to unix sockets with the socket named as /tmp/dcd-${UID}.socket, the client and server weren't hitting the same socket because they are on different UIDs. The query that worked from dcd-client passed due to a zombie session. I'll need to check to confirm.

@idanarye
Copy link
Owner

If you can confirm it, I'll add it to the docs.

@andrewbenton
Copy link
Author

So the problem is that as of DCD >= 0.8.0, the client and server on a *nix system try to use unix sockets. Since I was running DCD as a daemon, the socket was being created with a different name and with an inaccessible permission set. I can work around this by either launching a user-local version of the client, or adding --tcp --port 9166 to the client and server.

@andrewbenton
Copy link
Author

Having found that, would you be opposed to adding an optional argument to dutyl#register#tool to pass in an arg list?

@idanarye
Copy link
Owner

idanarye commented Apr 7, 2016

Waaay ahead of you...

I'll add some instructions to the docs about this.

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