atilaneves / flycheck-dmd-dub Goto Github PK
View Code? Open in Web Editor NEWflycheck and DCD dub support to enable D IDE features in Emacs
flycheck and DCD dub support to enable D IDE features in Emacs
Because
(add-hook 'd-mode-hook 'flycheck-dmd-dub-set-include-path)
doesn't work anymore, I instead guessed that I should use
(add-hook 'd-mode-hook 'flycheck-dmd-dub-set-variables)
but when loading a D-file (which lies in a sub-directory of a project root directory containing a dub.sdl
) into d-mode
this errors as
Debugger entered--Lisp error: (json-readtable-error 114)
signal(json-readtable-error (114))
json-read()
json-read-from-string("rawRead must take a non-empty buffer\n")
fldd--set-variables-from-json-string("rawRead must take a non-empty buffer\n")
fldd--set-variables-from-dub-describe("/home/per/")
flycheck-dmd-dub-set-variables()
run-hooks(change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook d-mode-hook d-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook d-mode-hook d-mode-hook))
run-mode-hooks(d-mode-hook)
d-mode()
funcall-interactively(d-mode)
call-interactively(d-mode record nil)
command-execute(d-mode record)
#f(compiled-function (cmd) #<bytecode 0x192843d>)("d-mode")
ivy-call()
...
. What's wrong?
Hey, using sub-packages in dub breaks flycheck-dmd-dub. It is running dub describe in the sub-package folder instead of the package folder.
Debugger entered--Lisp error: (wrong-type-argument integerp nil)
fldd--get-dub-package-dirs-output("Error executing command describe: Root package SUB_PACKAGE_1 contains reference to invalid package PACKAGE:SUB_PACKAGE_2\n\n")
fldd--get-dub-package-dirs()
ac-dcd-find-imports-dub()
ac-dcd-add-imports()
call-interactively(ac-dcd-add-imports record nil)
command-execute(ac-dcd-add-imports record)
execute-extended-command(nil "ac-dcd-add-imports")
call-interactively(execute-extended-command nil nil)
get-dub-package-dirs
calls json-read-file
which in turn errors when called on
https://github.com/nordlow/justd/blob/master/dub.json
as
Debugger entered--Lisp error: (json-string-format "doesn't start with '\"'!")
signal(json-string-format ("doesn't start with '\"'!"))
(if (char-equal (json-peek) 34) nil (signal (quote json-string-format) (list "doesn't start with '\"'!")))
json-read-string()
json-read-object()
apply(json-read-object nil)
json-read()
json-read-object()
apply(json-read-object nil)
json-read()
json-read-file("~/justd/dub.json")
eval((json-read-file "~/justd/dub.json"))
eval-expression((json-read-file "~/justd/dub.json") nil)
funcall-interactively(eval-expression (json-read-file "~/justd/dub.json") nil)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
My dub.json is accepted by DUB.
I've tried removing lines but I can't understand what is wrong.
I added the recommended line to my init.el, but when I open my app.d in emacs, flycheck still does not recognize the includes from inside my package directory. Is there anything additional I should be doing here? My dub project hierarchy is the same as the default made by dub init.
package_name/dub.json
package_name/source/app.d
package_name/source/package_name/{all the files I am including}
emacs version: 24.4.1
flycheck-dmd-dub version: 20140814.1259 (melpa)
flycheck version: 20150125.601 (melpa)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.