meson: support settings overrides from editor#306
Conversation
This introduces settings overrides (`EditorOptions`) passed from the editor to the server in the initialize() call. These overrides are just currently for the Meson backend. The intent is to have the vala-vscode extension send these options from the Meson VSCode extension to VLS. Closes #304 and #305.
|
@PterX try out this branch along with the experimental version of Vala-VSCode I attached (unzip first, then install the |
|
@PterX ping for testing |
lw64
left a comment
There was a problem hiding this comment.
I have not tested anything, nor know what the issue is here exactly. I only looked a bit over the code, and except the three things it looks alright. Maybe my comment aren't correct though, seems like you tested it already with the vscode extension
| try { | ||
| meson_build_dir.make_directory_with_parents (cancellable); | ||
| this.build_dir = editor_options.mesonBuildDir; | ||
| } catch (IOError.EXISTS e) { |
There was a problem hiding this comment.
the cancellable error isnt handled here I think
There was a problem hiding this comment.
That is intentional. In the case of cancellation, we want to back out of configuring the Meson build entirely.
| */ | ||
| class EditorOptions : Object { | ||
| public EditorType editorType { get; set; } | ||
| public string[] mesonConfigureOptions { get; set; } |
There was a problem hiding this comment.
I believe arrays arent "native" gobject properties, so they probably cannot be serialized automatically. I guess you need to implement the Json.Serializable interface.
There was a problem hiding this comment.
I think the exception is string[] which becomes gchararray in the GLib type system.
|
The issue is that the Meson extension in VSCode can specify default arguments when compiling the project, and we want VLS and the Vala extension to pick this up. |
This introduces settings overrides (
EditorOptions) passed from the editor to the server in the initialize() call. These overrides are just currently for the Meson backend. The intent is to have the Vala VSCode extension send these options from the Meson VSCode extension to VLS.Closes #304
Closes #305
Requires vala-lang/vala-vscode#31 to be merged.