gd-autocomplete-service
gd-autocomplete-service copied to clipboard
Many compile errors
Many of the include paths need to be updated. and the root dir needs to have the code in it so that the code can be cloned into the modules folder. The repo needs to be named with underscores instead of dashes, or the compile will fail for some reason.
In the following files I think the OBJ_TYPE lines need to be changed to GDCLASS: code_completion_server.h: GDCLASS(CodeCompletionServer, Object); code_completion_service.h: GDCLASS(CodeCompletionService, Node); completion_service_plugin.h: GDCLASS(CompletionServicePlugin, EditorPlugin);
And there is still one final error that I do not yet know how to overcome. At the end of compile I get the following error:
scons -j8 platform=x11
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 7%] Compiling ==> modules/autocomplete_service/register_types.cpp
[100%] progress_finish(["progress_finish"], [])
[100%] Linking Program ==> bin/godot.x11.tools.64
[100%] modules/libmodules.x11.tools.64.a(register_types.x11.tools.64.o): In function `EditorPlugin* EditorPlugins::creator<CompletionServicePlugin>(EditorNode*)':
godot/modules/autocomplete_service/../../editor/editor_plugin.h:255: undefined reference to `CompletionServicePlugin::CompletionServicePlugin(EditorNode*)'
collect2: error: ld returned 1 exit status
scons: *** [bin/godot.x11.tools.64] Error 1
scons: building terminated because of errors.
code_completion_server.h
#include "../../core/object.h"
#include "../../core/os/thread.h"
#include "../../core/io/tcp_server.h"
completion_service_plugin.h
#include "../../editor/editor_plugin.h
Those are the updated include paths. I think that's all of them. I would update all of this and make a pull request, but I don't want to do that, since after my 'fixes' it still doesn't compile.
I'm gonna fork this repo and make the changes and see I can get enough traction to get this issue fixed.
I have forked the repo, made the changes and done a pull request. I still haven't fixed the last compile error though, as I don't know C++ so it's taking additional time to get my head around it.
@gunrugger - I have auto-completions working in Atom via the PR I just submitted to your fork.
Also requires updating the atom module to change line 59 from:
while not currentDir.getFile("engine.cfg").existsSync()
to while not currentDir.getFile("project.godot").existsSync()
, which I suspect you may already be aware of since it was updated in your README.md.
This should make the as-is module 3.1 compatible (note that it is not 3.0 compatible).
There are several opportunities for making this a bit more robust, trending towards a language server, which I can open as issues, depending on how you'd like to manage -- e.g., refactoring the HTTP Response Status Codes so the client can implement some more robust error handling.
Notifying @Schroedi since he contributed to getting this compiling on your fork as well.