Giter Club home page Giter Club logo

Comments (25)

buggins avatar buggins commented on May 28, 2024 1

it could be easy solution just to integrade dcd into app - run it in separate thread and pass parameters and get result directly in D code.
DCD might be modified to be able building as library with communication and interface related stuff stripped out.
But there is a big problem: it's licensed under GPL3 - and incompatible with Boost license IMHO.

from dlangide.

Hackerpilot avatar Hackerpilot commented on May 28, 2024

important to note is, that since DCD parses the code itself one needs to save unsaved changes in the file in a tmpfile to have DCD parse it, which should not be a problem and be significantly easier and safer than integrating libdparse yourself. SOA for the win ;)

dcd-client accepts input from a file or stdin. Saving to a temporary file is not necessary.

from dlangide.

extrawurst avatar extrawurst commented on May 28, 2024

Even better!!

On Tue, Feb 10, 2015 at 11:22 PM, Brian Schott [email protected]
wrote:

important to note is, that since DCD parses the code itself one needs to
save unsaved changes in the file in a tmpfile to have DCD parse it, which
should not be a problem and be significantly easier and safer than
integrating libdparse yourself. SOA for the win ;)

dcd-client accepts input from a file or stdin. Saving to a temporary file
is not necessary.


Reply to this email directly or view it on GitHub
#20 (comment).

from dlangide.

extrawurst avatar extrawurst commented on May 28, 2024

So back to running it as a seperated process

from dlangide.

Freakazo avatar Freakazo commented on May 28, 2024

How would I display the suggestions?

from dlangide.

extrawurst avatar extrawurst commented on May 28, 2024

maybe a popup menu ?
see example of dlangui for that: https://github.com/buggins/dlangui/blob/master/examples/example1/src/example1.d#L287

but maybe another dedicated window for this would be more appropriate

from dlangide.

buggins avatar buggins commented on May 28, 2024

while icon + text is enough, we can use popup menu

from dlangide.

buggins avatar buggins commented on May 28, 2024

are you planning to run dcd-client executable to invoke dcd?
I think we can just use sockets to connect to dcd directly.

from dlangide.

Freakazo avatar Freakazo commented on May 28, 2024

Yup, as it currently stands I'm using dcd-client to communicate with dcd-server. Having a look at dcd-client source code it shouldn't be hard to replicate its behaviour.

At the moment I'm just finishing up the basic auto completion part and then I'll send a pull request so that the code can be reviewed.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Merged pull request and as well did some refactoring and improvements.

from dlangide.

Revito avatar Revito commented on May 28, 2024

You forgot to upload dcd-client.exe.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Yes, thanks. Will submit it tomorrow. So far you can build it yourself.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Experimenting with direct using of libdparse

from dlangide.

Freakazo avatar Freakazo commented on May 28, 2024

Ah, that would definitely work much better than using it indirectly through dcd.

from dlangide.

buggins avatar buggins commented on May 28, 2024

So far, I'm trying to implement GoToDefinition feature with libdparse.

from dlangide.

keywan-ghadami avatar keywan-ghadami commented on May 28, 2024

I am going to improve dub support of that libparse and related packages. I have registered dub packages for libparsed, dsymbol and dcd. I guess that will it make it easer to integrate them.

i integrated DCD via dub without that client/server stuff
#88
it reduces the about of code needed to communicate with DCD and makes the hole thing a lot simpler, also it's now easier to follow/debug directly into DCD and DCD is automatically available without any manual steps for the user.

@buggins I saw that you started to prepare some even better integration - i just wanted to say that my changes may make it easier for that kind of implementation because it's more similar.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Let's use your DCD integration implementation so far.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Fixed VisualD and Mono-D projects for new DCD integration.
README is updated with dependency cloning instructions

from dlangide.

buggins avatar buggins commented on May 28, 2024

BTW, code completion and finding references doesn't work for me

from dlangide.

keywan-ghadami avatar keywan-ghadami commented on May 28, 2024

It stopped working for me too (linux) , i have some ideas what it could be (working path, modulecache, dependencies...). I checked the code from dcd server.d which is NOT used by dlangide and the only difference i found was that it sets a loglevel and changes the working directory - (and it does not set a logger). Maybe we need to set the working directory to something specific before calling DCD (seems it makes differece if it runs in linux or windows). Sorry for all the trouble...

from dlangide.

buggins avatar buggins commented on May 28, 2024

Fixed problem with new DUB version today.
It looks like new DUB fetches dependencies into subdirectories.
As a result, dlangide did not find dependency projects.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Reproduced non-working GoToDefinition in single file project.
In some cases position is determined wrongly.

Source lines:
auto foo = new Foo();
writeln("Hello World!");

DlangIDE log:
2016-01-12 10:43:10.425 D DCD Context: oo = new F|oo();
2016-01-12 10:43:10.426 D DCD fileName:

DCD log:

2016-01-12T10:41:14.039:..\DCD\src\server\autocomplete.d:getSymbolsByTokenChain:743 Could not find declaration of "Hello World!" from position 240
2016-01-12T10:41:14.039:..\DCD\src\server\autocomplete.d:findDeclaration:135 Could not find symbol declaration

DCD looks up symbol one line lower than expected by DlangIDE

from dlangide.

Hackerpilot avatar Hackerpilot commented on May 28, 2024

I'm pretty sure that this isn't a DCD bug because all the other editor plugins work.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Unfortunately I cannot reproduce it anymore since I modified source and did not save original.
Now it's working ok.

from dlangide.

buggins avatar buggins commented on May 28, 2024

Closing this issue since DCD integration seems done

from dlangide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.