-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
meson: support settings overrides from editor #306
base: master
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the cancellable error isnt handled here I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lw64 let me know if you have any other questions. Otherwise you can approve.
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.