Merge branch 'master' of https://github.com/Hackerpilot/DCD
This commit is contained in:
commit
cdc57193d1
49
build.bat
49
build.bat
|
@ -1,3 +1,48 @@
|
|||
dmd -wi client.d messages.d stupidlog.d msgpack-d/src/msgpack.d -Imsgpack-d/src -release -inline -O -ofdcd-client -L/EXETYPE:NT -L/SUBSYSTEM:WINDOWS
|
||||
del /f containers\src\std\allocator.d
|
||||
|
||||
dmd^
|
||||
client.d^
|
||||
messages.d^
|
||||
stupidlog.d^
|
||||
msgpack-d/src/msgpack.d^
|
||||
-Imsgpack-d/src^
|
||||
-release -inline -O -wi^
|
||||
-ofdcd-client
|
||||
|
||||
dmd^
|
||||
actypes.d^
|
||||
conversion/astconverter.d^
|
||||
conversion/first.d^
|
||||
conversion/second.d^
|
||||
conversion/third.d^
|
||||
autocomplete.d^
|
||||
constants.d^
|
||||
messages.d^
|
||||
modulecache.d^
|
||||
semantic.d^
|
||||
server.d^
|
||||
stupidlog.d^
|
||||
string_interning.d^
|
||||
libdparse/src/std/d/ast.d^
|
||||
libdparse/src/std/d/entities.d^
|
||||
libdparse/src/std/d/lexer.d^
|
||||
libdparse/src/std/d/parser.d^
|
||||
libdparse/src/std/lexer.d^
|
||||
libdparse/src/std/allocator.d^
|
||||
libdparse/src/std/d/formatter.d^
|
||||
containers/src/memory/allocators.d^
|
||||
containers/src/memory/appender.d^
|
||||
containers/src/containers/dynamicarray.d^
|
||||
containers/src/containers/ttree.d^
|
||||
containers/src/containers/unrolledlist.d^
|
||||
containers/src/containers/hashset.d^
|
||||
containers/src/containers/internal/hash.d^
|
||||
containers/src/containers/internal/node.d^
|
||||
containers/src/containers/slist.d^
|
||||
msgpack-d/src/msgpack.d^
|
||||
-Icontainers/src^
|
||||
-Imsgpack-d/src^
|
||||
-Ilibdparse/src^
|
||||
-wi -O -release^
|
||||
-ofdcd-server
|
||||
|
||||
dmd actypes.d conversion/astconverter.d conversion/first.d conversion/second.d conversion/third.d autocomplete.d constants.d messages.d modulecache.d semantic.d server.d stupidlog.d string_interning.d dscanner/std/d/ast.d dscanner/std/d/entities.d dscanner/std/d/lexer.d dscanner/std/d/parser.d dscanner/std/lexer.d dscanner/std/allocator.d dscanner/formatter.d containers/src/memory/appender.d containers/src/memory/allocators.d containers/src/containers/dynamicarray.d containers/src/containers/ttree.d containers/src/containers/hashset.d containers/src/containers/unrolledlist.d containers/src/containers/internal/hash.d msgpack-d/src/msgpack.d -Icontainers/src -Imsgpack-d/src -Idscanner -wi -g -O -release -ofdcd-server
|
||||
|
|
4
build.sh
4
build.sh
|
@ -42,7 +42,7 @@ dmd\
|
|||
msgpack-d/src/msgpack.d\
|
||||
-Icontainers/src\
|
||||
-Imsgpack-d/src\
|
||||
-Idscanner\
|
||||
-Ilibdparse/src\
|
||||
-wi -O -release -inline\
|
||||
-ofdcd-server
|
||||
|
||||
|
@ -71,7 +71,7 @@ dmd\
|
|||
# dscanner/formatter.d\
|
||||
# msgpack-d/src/msgpack.d\
|
||||
# -Imsgpack-d/src\
|
||||
# -Idscanner\
|
||||
# -Ilibdparse/src\
|
||||
# -O3 -frelease -fno-bounds-check\
|
||||
# -odcd-server
|
||||
|
||||
|
|
2
client.d
2
client.d
|
@ -225,6 +225,8 @@ AutocompleteResponse getResponse(TcpSocket socket)
|
|||
auto bytesReceived = socket.receive(buffer);
|
||||
if (bytesReceived == Socket.ERROR)
|
||||
throw new Exception("Incorrect number of bytes received");
|
||||
if (bytesReceived == 0)
|
||||
throw new Exception("Server closed the connection, 0 bytes received");
|
||||
AutocompleteResponse response;
|
||||
msgpack.unpack(buffer[0..bytesReceived], response);
|
||||
return response;
|
||||
|
|
|
@ -150,21 +150,19 @@ If you want to restart server, use `ac-dcd-init-server' instead."
|
|||
|
||||
|
||||
;; utility functions to call process
|
||||
|
||||
(defun ac-dcd-call-process (prefix args)
|
||||
(let ((buf (get-buffer-create ac-dcd-output-buffer-name))
|
||||
(defun ac-dcd-call-process (prefix &rest args)
|
||||
(if (null ac-dcd-executable)
|
||||
(error (format "Could not find dcd-client executable"))
|
||||
(let ((buf (get-buffer-create "*dcd-output*"))
|
||||
res)
|
||||
(with-current-buffer buf (erase-buffer))
|
||||
(setq res (apply 'call-process-region (point-min) (point-max)
|
||||
ac-dcd-executable nil buf nil
|
||||
args
|
||||
))
|
||||
ac-dcd-executable nil buf nil args))
|
||||
(with-current-buffer buf
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward ac-dcd-error-message-regexp nil t)
|
||||
(unless (eq 0 res)
|
||||
(ac-dcd-handle-error res args))
|
||||
;; Still try to get any useful input.
|
||||
(ac-dcd-parse-output prefix))))
|
||||
(ac-dcd-parse-output prefix)))))
|
||||
|
||||
(defsubst ac-dcd-cursor-position ()
|
||||
"Get cursor position to pass to dcd-client.
|
||||
|
|
|
@ -101,6 +101,8 @@ struct ModuleCache
|
|||
{
|
||||
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))
|
||||
{
|
||||
import std.path: baseName;
|
||||
if(fileName.baseName.startsWith(".#")) continue;
|
||||
getSymbolsInModule(fileName);
|
||||
}
|
||||
}
|
||||
|
|
2
server.d
2
server.d
|
@ -157,7 +157,7 @@ int main(string[] args)
|
|||
}
|
||||
if (request.kind & RequestKind.addImport)
|
||||
ModuleCache.addImportPaths(request.importPaths);
|
||||
else if (request.kind & RequestKind.autocomplete)
|
||||
if (request.kind & RequestKind.autocomplete)
|
||||
{
|
||||
Log.info("Getting completions");
|
||||
AutocompleteResponse response = complete(request);
|
||||
|
|
Loading…
Reference in New Issue