-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Code intelligence" silently failing to start #255
Comments
Hi, can you share the full output log? |
Here's the output from the "Vala Language Server" drop-down in "output" tab. (Note that the errors here are consistent with the errors that I should be getting inline.) Output: Vala Language Server
And here's the output from a few other drop-down items under "output". (Note that this is on a macOS host device.) Output: Log (Extension Host)
Output: Log (Remote Server)
Output: Log (Remote Extension Host)
And here's the output from Command Line Build Outputroot@a08fa01d3aae:/workspaces/nextcloud-vala# ninja -C Build
ninja: Entering directory `Build'
[0/1] Regenerating build files.
The Meson build system
Version: 0.53.2
Source dir: /workspaces/nextcloud-vala
Build dir: /workspaces/nextcloud-vala/Build
Build type: native build
Project name: com.elsiehupp.NextcloudVala
Project version: 1.0.0
C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34
Vala compiler for the host machine: valac (valac 0.48.24)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Dependency gio-2.0 found: YES 2.64.6 (cached)
Dependency gtk+-3.0 found: YES 3.24.20 (cached)
Dependency json-glib-1.0 found: YES 1.4.4 (cached)
Dependency libsecret-1 found: YES 0.20.4 (cached)
Dependency libsoup-2.4 found: YES 2.70.0 (cached)
|Executing subproject common method meson
|
|Project name: com.elsiehupp.NextcloudVala.Common
|Project version: 1.0.0
|C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
|C linker for the host machine: cc ld.bfd 2.34
|Vala compiler for the host machine: valac (valac 0.48.24)
|Dependency gio-2.0 found: YES 2.64.6 (cached)
|Dependency sqlite3 found: YES 3.31.1 (cached)
|Dependency zlib found: YES 1.2.11 (cached)
|
||Executing subproject gpseq_lib method meson
||
||Project name: gpseq
||Project version: 0.3.3
||C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
||C linker for the host machine: cc ld.bfd 2.34
||Vala compiler for the host machine: valac (valac 0.48.24)
||Message: gpseq version: 0.3.3
||Library m found: YES
||Dependency glib-2.0 found: YES 2.64.6 (cached)
||Dependency gobject-2.0 found: YES 2.64.6 (cached)
||Dependency gee-0.8 found: YES 0.20.3 (cached)
||Build targets in project: 2
||Subproject gpseq_lib finished.
|
|Build targets in project: 3
|Subproject common finished.
|Executing subproject csync method meson
|
|Project name: com.elsiehupp.NextcloudVala.CSync
|Project version: 1.0.0
|C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
|C linker for the host machine: cc ld.bfd 2.34
|Vala compiler for the host machine: valac (valac 0.48.24)
|Library posix found: YES
|Dependency gio-2.0 found: YES 2.64.6 (cached)
|Build targets in project: 4
|Subproject csync finished.
|Executing subproject lib_sync method meson
|
|Project name: com.elsiehupp.NextcloudVala.LibSync
|Project version: 1.0.0
|C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
|C linker for the host machine: cc ld.bfd 2.34
|Vala compiler for the host machine: valac (valac 0.48.24)
|Dependency gio-2.0 found: YES 2.64.6 (cached)
|Dependency gtk+-3.0 found: YES 3.24.20 (cached)
|Dependency gnutls found: YES 3.6.13 (cached)
|Dependency libsoup-2.4 found: YES 2.70.0 (cached)
|Build targets in project: 5
|Subproject lib_sync finished.
|Executing subproject cmd method meson
|
|Project name: com.elsiehupp.NextcloudVala.Cmd
|Project version: 1.0.0
|C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
|C linker for the host machine: cc ld.bfd 2.34
|Vala compiler for the host machine: valac (valac 0.48.24)
|Dependency gtk+-3.0 found: YES 3.24.20 (cached)
|Dependency json-glib-1.0 found: YES 1.4.4 (cached)
|Dependency libsoup-2.4 found: YES 2.70.0 (cached)
|Dependency sqlite3 found: YES 3.31.1 (cached)
|Library readline found: YES
|Build targets in project: 7
|Subproject cmd finished.
Build targets in project: 8
com.elsiehupp.NextcloudVala 1.0.0
Subprojects
cmd: YES
common: YES
csync: YES
gpseq_lib: YES
lib_sync: YES
Found ninja-1.10.0 at /usr/bin/ninja
[1/698] Compiling Vala source ../subprojects/gpseq_li...projects/gpseq_lib/src/collectors/WrapCollector.vala.
../subprojects/gpseq_lib/src/AtomicInt64Val.vala:42.3-42.34: warning: method `Gpseq.AtomicInt64Val.compare_and_exchange' never used
public bool compare_and_exchange (int64 oldval, int64 newval) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/ConcatArrayBuffer.vala:38.3-38.49: warning: method `Gpseq.ConcatArrayBuffer.concat_multiple' never used
public static ArrayBuffer<G> concat_multiple<G> (ArrayBuffer<G>[] bufs) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/Gpseq.vala:395.2-395.36: warning: method `Gpseq.atomic_uint_inc' never used
private extern void atomic_uint_inc ([CCode (type="volatile gint *")] ref uint atomic);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/Gpseq.vala:401.2-401.36: warning: method `Gpseq.atomic_uint_add' never used
private extern uint atomic_uint_add ([CCode (type="volatile gint *")] ref uint atomic, [CCode (type="gint")] uint val);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/Gpseq.vala:403.2-403.35: warning: method `Gpseq.atomic_uint_or' never used
private extern uint atomic_uint_or ([CCode (type="volatile guint *")] ref uint atomic, uint val);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/MatchTask.vala:54.3-54.39: warning: Type `bool?' can not be used for a GLib.Object property
protected override bool? empty_result {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/gpseq_lib/src/Promise.vala:203.5-203.28: warning: copying delegates is not supported
public CallbackFunc func;
^^^^^^^^^^^^^^^^^^^^^^^^
Loaded package `/usr/share/vala-0.48/vapi/glib-2.0.vapi'
Loaded package `/usr/share/vala-0.48/vapi/gobject-2.0.vapi'
Loaded package `/usr/share/vala-0.48/vapi/posix.vapi'
Loaded package `/usr/share/vala-0.48/vapi/readline.vapi'
Loaded package `/usr/share/vala/vapi/gee-0.8.vapi'
Compilation succeeded - 7 warning(s)
[2/583] Compiling Vala source ../subprojects/common/A...VfsOff.vala subprojects/gpseq_lib/src/gpseq-1.0.vapi.
FAILED: subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Asserts.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/ComputeChecksum/AbstractComputeChecksum.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/ComputeChecksum/ComputeChecksum.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/ComputeChecksum/CSyncChecksumHook.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/ComputeChecksum/ValidateChecksumHeader.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Config.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Constants.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Errors/InvalidParameterError.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/FileSystem.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/JenkinsHash.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/PluginFactory/AbstractPluginFactory.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/PluginFactory/DefaultPluginFactory.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/PreparedSqlQuery.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/PreparedSqlQueryManager.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/RemotePermissions.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Result/Result.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SqlDatabase.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SqlQuery.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SyncFileStatus.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SyncJournalDb.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SyncJournalFileRecord/ConflictRecord.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SyncJournalFileRecord/SyncJournalErrorBlocklistRecord.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/SyncJournalFileRecord/SyncJournalFileRecord.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Utility.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Version.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/AbstractVfs.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/ItemAvailability.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/PinState.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/SetupParameters.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/VfsMode.c subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha/Vfs/VfsOff.c subprojects/common/com.elsiehupp.NextcloudVala.Common.h subprojects/common/com.elsiehupp.NextcloudVala.Common.vapi
valac -C --debug --debug --pkg posix --pkg readline --pkg posix --pkg readline --pkg posix --pkg readline --pkg posix --pkg readline --pkg posix --pkg readline --pkg zlib --pkg sqlite3 --pkg gio-2.0 --color=always --directory subprojects/common/e622d6a@@com.elsiehupp.NextcloudVala.Common@sha --basedir ../subprojects/common --library com.elsiehupp.NextcloudVala.Common --header subprojects/common/com.elsiehupp.NextcloudVala.Common.h --vapi ../com.elsiehupp.NextcloudVala.Common.vapi ../subprojects/common/Asserts.vala ../subprojects/common/ComputeChecksum/AbstractComputeChecksum.vala ../subprojects/common/ComputeChecksum/ComputeChecksum.vala ../subprojects/common/ComputeChecksum/CSyncChecksumHook.vala ../subprojects/common/ComputeChecksum/ValidateChecksumHeader.vala ../subprojects/common/Config.vala ../subprojects/common/Constants.vala ../subprojects/common/Errors/InvalidParameterError.vala ../subprojects/common/FileSystem.vala ../subprojects/common/JenkinsHash.vala ../subprojects/common/PluginFactory/AbstractPluginFactory.vala ../subprojects/common/PluginFactory/DefaultPluginFactory.vala ../subprojects/common/PreparedSqlQuery.vala ../subprojects/common/PreparedSqlQueryManager.vala ../subprojects/common/RemotePermissions.vala ../subprojects/common/Result/Result.vala ../subprojects/common/SqlDatabase.vala ../subprojects/common/SqlQuery.vala ../subprojects/common/SyncFileStatus.vala ../subprojects/common/SyncJournalDb.vala ../subprojects/common/SyncJournalFileRecord/ConflictRecord.vala ../subprojects/common/SyncJournalFileRecord/SyncJournalErrorBlocklistRecord.vala ../subprojects/common/SyncJournalFileRecord/SyncJournalFileRecord.vala ../subprojects/common/Utility.vala ../subprojects/common/Version.vala ../subprojects/common/Vfs/AbstractVfs.vala ../subprojects/common/Vfs/ItemAvailability.vala ../subprojects/common/Vfs/PinState.vala ../subprojects/common/Vfs/SetupParameters.vala ../subprojects/common/Vfs/VfsMode.vala ../subprojects/common/Vfs/VfsOff.vala subprojects/gpseq_lib/src/gpseq-1.0.vapi
../subprojects/common/ComputeChecksum/ComputeChecksum.vala:203.41-203.44: error: syntax error, expected ( or [
var shared_device = new unowned GLib.OutputStream (device.release ());
^^^^
../subprojects/common/FileSystem.vala:32.31-32.31: error: syntax error, following expression/statement delimiter `;' missing
GLib.FileUtils.chmod ()
^
../subprojects/common/SyncJournalDb.vala:1737.5-1737.49: error: `SyncJournalDb' already contains a definition for `avoid_renames_on_signal_next_sync'
public void avoid_renames_on_signal_next_sync (string path) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/common/SyncJournalDb.vala:1730.5-1730.49: note: previous definition of `avoid_renames_on_signal_next_sync' was here
public void avoid_renames_on_signal_next_sync (string path) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/common/SyncJournalDb.vala:1937.5-1937.50: error: `SyncJournalDb' already contains a definition for `schedule_path_for_remote_discovery'
public void schedule_path_for_remote_discovery (string filename) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/common/SyncJournalDb.vala:1930.5-1930.50: note: previous definition of `schedule_path_for_remote_discovery' was here
public void schedule_path_for_remote_discovery (string filename) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../subprojects/common/SyncJournalDb.vala:2262.65-2262.65: error: syntax error, expected identifier
get_file_records_by_file_id (conflict.base_file_id, [result] (record) => {
^
../subprojects/common/SyncJournalDb.vala:2266.14-2266.14: error: syntax error, expected identifier
});
^
../subprojects/common/SyncJournalDb.vala:2793.13-2793.13: error: syntax error, expected identifier
[] (sqlite3_context context, int, argv) {
^
../subprojects/common/SyncJournalDb.vala:2807.14-2807.14: error: syntax error, expected identifier
}, null, null);
^
../subprojects/common/SyncJournalDb.vala:2815.46-2815.46: error: syntax error, `new' modifier not allowed on creation method
SqlQuery create_query = new SqlQuery (this.database);
^
../subprojects/common/SyncJournalDb.vala:2986.59-2986.59: error: syntax error, `new' modifier not allowed on creation method
SqlQuery version_query = new SqlQuery.with_string ("SELECT major, minor, patch FROM version;", this.database);
^
Compilation failed: 10 error(s), 0 warning(s)
[3/583] Compiling Vala source ../subprojects/gpseq_li...s/test.vala subprojects/gpseq_lib/src/gpseq-1.0.vapi.
Loaded package `/usr/share/vala-0.48/vapi/glib-2.0.vapi'
Loaded package `/usr/share/vala-0.48/vapi/gobject-2.0.vapi'
Loaded package `/usr/share/vala-0.48/vapi/posix.vapi'
Loaded package `/usr/share/vala-0.48/vapi/readline.vapi'
Loaded package `/usr/share/vala/vapi/gee-0.8.vapi'
ninja: build stopped: subcommand failed. Colin has since told me that when he reproduced the issue in Sublime Text, he did so not in a Docker container but rather on a regular elementary OS device. Nonetheless, here are some other possible causes:
Please do let me know if there's anything else you need. Thanks! |
@elsiehupp you need to enable debug mode. You would get much more informative output, then. To do this, go into the extension settings and enable "Debug Mode." Then rerun VLS and give me the log. |
I will say it looks from your build log that your project can't compile, which could be the root cause, but we'll have to see what the log says. |
Hi @Prince781—thanky you for your response!
I ran into an issue with Meson not properly cloning a
Anyway, with the Meson changes and with debug enabled on the Vala extension—see this commit I just pushed—the output is as follows: Output: Vala Language Server
The other logs are as follows: Output: Log (Remote Server)
Output: Log (Remote Extension Host)
And Command Line Build Output
|
The problem here is that you're using a version of VLS that's over a year old:
This might be fixed in the latest stable release, which is the only version of VLS that we support. What you can do is have your container build and install VLS 0.48.5, then see if you still have this issue. |
Okay! So I removed the elementary OS version of
Here is the same set of outputs after I switched to OutputOutput: Vala Language Server
Output: Log (Remote Server)
Output: Log (Remote Extension Host)
Command Line Build Output
|
The root cause here may be that because at least one of your subprojects fails to build, the main project might be without a |
However, if you said this only fails inside a container, that's even stranger... |
@colinkiama was apparently able to reproduce the issue outside the sandbox (also on elementary OS). He talked about it on the Vala Discord but hasn't had a chance to drop by this issue thread, yet. Way back in my original comment, I did say this:
Basically I did the switch to Meson subprojects at roughly the same time that I did the switch to a Docker container, which made it difficult to tell which of the two was the likely culprit. Oops!
I mean, the odd (or frustrating) thing here is that code intelligence just silently fails, without
I guess the issue then is that there's an error in the build process that causes code intelligence to fail to launch, but neither
|
I changed the title because the issue doesn't seem to be specific to the container. I did comment out literally everything except the class names, so that compilation would work (though with no actual code), and code intelligence started working again, so the container doesn't seem to be the problem. I'll follow up if I have any further information down the line. |
Personally mine is failing to start when I add dependencies other then the one provided by the GNOME Builder template for Vala applications. Here's a snippet of my meson.build. The libsoup-3.0 is the dependencies troubling the language server for me.
edit: I was just dumb and installed the wrong dev package on my system. It works fine now. |
Describe the Bug
I'm having trouble with getting
vala-language-server
to do VS Code code intelligence in a Docker Dev Container (based on the elementary OS Odin Dockerfile; customized version here). Vala Language Server does show up in the drop-down menu under "Output", but none of the output appears with inline code intelligence (i.e. under "Problems").I was, in fact, able to use Vala Language Server VS Code code intelligence in a regular elementary OS setup, but I haven't gotten it to work since I set up a Docker Dev Container. There is also a non-zero possibility that the issue doesn't actually have anything to do with the Dev Container but rather arose from other changes I made around the same time, but it's difficult to test this hypothesis either way.
I should also mention that, yes, both
vala-language-server
and theprince781.vala
VS Code extension are installed and set up in the Dev Container: I do have syntax highlighting and output, just not inline code intelligence, so it seems like the two maybe just can't see or talk to each other? The container settings do manually specify the install path, though.Software
apt
repository (installed by the Dockerfile during the container setup)valac --version
): Vala 0.48.24To Reproduce
Source code repo: https://github.com/elsiehupp/sync/
To open the repository in a VS Code Dev Container:
The text was updated successfully, but these errors were encountered: