You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have recently started using meson.
I'd like to add the following feature to vscode-meson.
What
When developing software using compiled languages such as c++ or rust, it often happens to switch between multiple build configurations such as so-called 'release' and 'debug'.
In meson, this is supposed to be done by creating multiple builddirs and switching between them. (see Using multiple build directories)
In vscode-meson, switching between builddirs requires rewriting mesonbuild.buildFolder in settings.json, which is not very convenient.
I would like to be able to switch this easily.
How to work
I will explain how these can be realized given the knowledge gained from reading the threads and source code below. (because I'm new)
Currently vscode-meson reactivates itself by calling reloadWindow when sourceDir is selected or mesonbuild.buildFolder is changed.
Although reloading is generally an undesirable behavior, I'd like to follow this behavior for the time being to minimize source code changes by reloading when switching buildDirs.
(Avoiding reloads should be a separate issue.)
Specification overview
Automatic launch of selection UI at first startup
Basically, add a buildDir selection flow after the user selects sourceDir.
This also includes leaving sourceDir as is and selecting only buildDir.
buildDir selection UI
Unlike sourceDir selection, it does not search the file system to collect existing buildDir. User enters the path manually or selects from previous entries.
Saving sourceDir selection
This buildDir selection is permanently remembered in memento, just like sourceDir.
On the next time startup, these values will be applied and the user does not need to make a selection.
Explicit selection UI launch from command or builddir selection via MesonProjectExplorer
Users can also launch the selection UI from the command palette or select a builddir directly from the MesonProjectExplorer in the side panel.
Save format of buildDir
I expect that "mesonbuild.buildFolder" is probably unnecessary or a less important setting.
The buildDir selected by the UI is permanently saved in the format below.
Please note that multiple buildDirs are stored per sourceDir, and the most recently used one is placed at 0th.
typeBuildConfig={buildDir: string;// path to builddirfriendlyName: string;// for displaying of MesonProjectExplorer};typeBuildConfigMap={[sourceDir: string]: BuildConfig[]// multiple builddirs per sourceDir};// exampleletbuildDirsMap: BuildConfigMap={"path/to/sourceDir1": [{buildDir: "path/to/sourceDir1/build_dbg",friendlyName: "x64_dbg",},{buildDir: "path/to/sourceDir1/build_rel",friendlyName: "x64_rel",},],"path/to/sourceDir2": [{// It can also happen if buildDir is outside of sourceDir.buildDir: "path/to/out/of/sourceDir2/build_dbg",friendlyName: "x64_dbg",},{buildDir: "path/to/out/of/sourceDir2/build_rel",friendlyName: "x64_rel",},],};workspaceState.update("mesonbuild.buildDirsMap",buildDirsMap);
We need to discuss the details further, but for now I would like to hear everyone's opinions.
Thank you.
The text was updated successfully, but these errors were encountered:
I think what you are proposing sounds reasonable. It would be good to make the automatic popup optional via a setting
Thank you. I have considered about it.
It is better to integrate buildDir selection into the sourceDir selection UI.
Therefore, in this case, the popup settings should just follow the existing mesonbuild.selectRootDir.
(No need to introduce mesonbuild.selectBuildDir)
However, if you have sourceDir and only select buildDir, we will need to switch the popup wording.
So, is it like this?
if (!hasSourceDir) {}
showInformationMessage("Multiple Meson projects detected, select one?");
} else {
showInformationMessage("Build directory is not set. Do you want to set it?");
}
This might be somewhat confusing for users.
This is because if you reply "Never" to the former message, the latter message will also no longer be displayed.
Personally, this is acceptable.
Hi I have recently started using meson.
I'd like to add the following feature to vscode-meson.
What
When developing software using compiled languages such as c++ or rust, it often happens to switch between multiple build configurations such as so-called 'release' and 'debug'.
In meson, this is supposed to be done by creating multiple builddirs and switching between them. (see Using multiple build directories)
In vscode-meson, switching between builddirs requires rewriting
mesonbuild.buildFolder
in settings.json, which is not very convenient.I would like to be able to switch this easily.
How to work
I will explain how these can be realized given the knowledge gained from reading the threads and source code below. (because I'm new)
#201
#195
#188
#179
#101
#22
#103
Currently vscode-meson reactivates itself by calling
reloadWindow
when sourceDir is selected ormesonbuild.buildFolder
is changed.Although reloading is generally an undesirable behavior, I'd like to follow this behavior for the time being to minimize source code changes by reloading when switching buildDirs.
(Avoiding reloads should be a separate issue.)
Specification overview
Automatic launch of selection UI at first startup
Basically, add a buildDir selection flow after the user selects sourceDir.
This also includes leaving sourceDir as is and selecting only buildDir.
buildDir selection UI
Unlike sourceDir selection, it does not search the file system to collect existing buildDir. User enters the path manually or selects from previous entries.
Saving sourceDir selection
This buildDir selection is permanently remembered in memento, just like sourceDir.
On the next time startup, these values will be applied and the user does not need to make a selection.
Explicit selection UI launch from command or builddir selection via MesonProjectExplorer
Users can also launch the selection UI from the command palette or select a builddir directly from the MesonProjectExplorer in the side panel.
Save format of buildDir
I expect that "mesonbuild.buildFolder" is probably unnecessary or a less important setting.
The buildDir selected by the UI is permanently saved in the format below.
Please note that multiple buildDirs are stored per sourceDir, and the most recently used one is placed at 0th.
We need to discuss the details further, but for now I would like to hear everyone's opinions.
Thank you.
The text was updated successfully, but these errors were encountered: