On Saturday, 17 September 2016 at 04:57:03 UTC, Basile B. wrote:


You should use Dscanner to do this, not DMD. DScanner does not (or few) semantic, so just the module AST is necessary. It's way faster.

I know this because I was doing something similar to build the symbol list in Coedit 1 (using "-c -o- -Xf"). Finally a custom tool based on libdparse (and somehow doing one of the Dscanner job) was much faster.

Also "dub describe" can be very slow.

I just pushed a commit now which runs DUB in the Bash wrapper script as well, so it will never cause any input lag. I want to run DMD on D source files so I can get semantic analysis in Vim. That lets me know when a function call I am making is wrong, etc. Because the jobs run asynchronously, it doesn't matter if the job takes a few seconds to run. You will see the errors eventually without the process interrupting your editing of a particular file.

I plan to add a DScanner linter command too, and I'll be adding a configuration variable for selecting particular linters, so you can only use DScanner if you only want that, or use both DScanner and DMD.

I realised that I could easily get Windows support too by switching from using Bash to D for the wrapper script, and I could use maybe RDMD to compile and run the wrapper script. I'll do that eventually.

Reply via email to