Code Monkey home page Code Monkey logo

vscode-meson's Introduction

Meson for Visual Studio Code

This extension provides support for Meson in Visual Studio Code. This language grammar was based on the grammar found in the atom extension from Patrick Griffis, but has since been added onto to support more features, including code from the VSCode grammar for Python.

Meson logo by Jussi Pakkanen, licensed for use by this project. Icons from the Material Design Icons project.

Features

  • Syntax Highlighting
  • Automatic Task Provider
  • Code Snippets
  • Linting1
  • Formatting2
  • Generate environment file to be used in launch.json: "envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env" See Meson devenv
  • Configure Intellisense to use the compile_commands.json generated by Meson
  • Provide an Intellisense C/C++ configuration to use the meson-info introspection files: "C_Cpp.default.configurationProvider": "mesonbuild.mesonbuild"

* - requires an installation of muon.

New Extension ID

If you come from a previous installation, please make sure you are on the mesonbuild.mesonbuild extension. There are 3 variants/versions of this extension on the store, and only that one is released from this repository.

Footnotes

  1. Requires an installation of mesonlsp or muon.

  2. Requires an installation of muon.

vscode-meson's People

Contributors

aidenfoxx avatar andrei8l avatar annacrombie avatar apache-hb avatar asabil avatar cadubentzen avatar cerfical avatar chris-laplante avatar cskeogh avatar dcbaker avatar dependabot[bot] avatar deribaucourt avatar epirat avatar gentoo90 avatar jb2170 avatar jcwasmx86 avatar jfsimoneau avatar ljmf00 avatar lukester1975 avatar madsandreasen avatar mkaes avatar paveloom avatar ptomato avatar slavaandrejev avatar solarliner avatar stephanlachnit avatar tristan957 avatar wolfpld avatar xclaesse avatar ylatuya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-meson's Issues

Intellisense Code Completion

Just curious....does this plugin feed the include directories for headers into VSCode for code completion? I've got a bunch of red squiggles because VSCode can't find the headers. I had Ninja keep the .rsp files, and supposedly support for them was added in the latest version of the cpptools plugin. Everything compiles fine and runs as expected so Ninja and Clang in MSYS2 are doing their job.

What does this extension do?

I was expecting autocompletion in vscode for meson, but that's not happening.
I was expecting it will help fill in the missing include paths for headers for C/C++ intellisense

None of that is happening.

Can you please expound more on what your extension does.
Thank you 😄

Documentation on settings

Is there any documentation on the available settings? I'd like to set the compiler explicitly, but I can't work out if this is supported/how to do it.

Time for decent changelogs (please!)?

There's been lots of changes recently which is nice, but not much documentation. Specifically, c5a5166 broke my tasks.json and it took a while to figure out why.

I'm sure nobody's got time or interest for writing documentation, but with e.g. conventional-commits and BREAKING CHANGE in the commit message an auto generated changelog would've been very helpful. Pretty much looks after itself once set up.

I kinda touched on starting this in #68 but alas no responses...

[feature request] Implement promise resolver for 'mesonbuild.build'.

Hi,

In an external extension I'm calling await vscode.commands.executeCommand("mesonbuild.build", ""); Unfortunately the function returns immediately without awaiting the build results. I need to wait on completion of the build as this command is part of the prelauch task.

I changed runMesonBuild to solve this issue (I'm not an experienced JS programmer but this works):

export async function runMesonBuild(buildDir: string, name?: string) {
    try {
        let buildTask = await getTask(vscode, "build", name);
        const buildTaskExecution = await vscode.tasks.executeTask(buildTask);
        return new Promise((resolve) => {
            vscode.tasks.onDidEndTaskProcess(e => {
                if (e.execution === buildTaskExecution || e.execution.task === buildTask) 
                    resolve(e.exitCode);
            });
        });
    } catch (e) {
    vscode.window.showErrorMessage(`Could not build ${name}`);
    getOutputChannel().appendLine(`Building target ${name}:`);
    getOutputChannel().appendLine(e);
    getOutputChannel().show(true);
    return new Promise((resolve, reject) => reject(e));
    }
  }

Any chance to have this implemented?
Regards, Rolf

Redo layout of project name and version in sidebar

Currently the sidebar will show hse 2.2.0. I think it would look a little cleaner to show hse (2.2.0). Also if a project doesn't have a version defined ignore it instead of printing hse undefined -> hse.

[Feature request] Use shell for meson invocation

Feature description: use default shell for all meson invocations (the same way as ninja task are currently invoked).

Reasoning:
v1.2.0 added an awesome IDE integration, but it works only with native meson. Which means, it can't utilize meson that is present only in default shell (e.g. WSL shell).

Unresponsive extension host on Windows / extension hangs with custom build setup

Hi,

The extension hangs on Windows (not on MacOs) with a custom cross build setup (meson setup build/ --cross-file cross_gcc.build) found over here.

Regards,
Rolf

INFO UNRESPONSIVE extension host: starting to profile NOW
WARN UNRESPONSIVE extension host: 'mesonbuild.mesonbuild' took 59.18245264207378% of 2968ms, saved PROFILE here: 'file:///c%3A/Users/Rolf/AppData/Local/Temp/exthost-e5b945.cpuprofile'

{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,4]},{"id":2,"callFrame":{"functionName":"fulfilled","scriptId":"258","url":"file:///c:/Users/Rolf/.vscode/extensions/mesonbuild.mesonbuild-1.7.0/out/src/treeview/nodes/targets.js","lineNumber":4,"columnNumber":26},"hitCount":1238,"children":[3],"positionTicks":[{"line":5,"ticks":1238}]},{"id":3,"callFrame":{"functionName":"dirname","scriptId":"41","url":"node:path","lineNumber":652,"columnNumber":9},"hitCount":830 .....
exthost-e5b945.cpuprofile.txt

Stop asking to configure the project if `configureOnOpen` is `false`

I use this extension only to highlight the code in the Meson files. mesonbuild.configureOnOpen is set to false, yet the extension asks every time I start VS Code if I would like to configure the project. Nope, I have already said what I would like in the settings file. Trust me, don't ask me again, please.

Element with id da39a3ee5e6b4b0d3255bfef95601890afd80709 is already registered

Hey,
When I visit the "Meson" Tab, im getting that message:
Element with id da39a3ee5e6b4b0d3255bfef95601890afd80709 is already registered.

meson.build:

project('xs', 'cpp',
  version : '0.0.1',
  meson_version : '>= 0.48.0',
  default_options : [
    'buildtype=debugoptimized',
    'warning_level=1',
    'cpp_std=c++2a',
    'default_library=both',
    'b_lundef=false',
    'b_staticpic=true',
    'b_pie=true',
    'b_lto=true'
  ])

subdir('xs_framework')
subdir('xs_tools')

====================================

xs_tools/meson.build:
subdir('xs_injector')

xs_tools/xs_injector/meson.build:

# Library metadata
xs_injector_name = 'xs_injector'
xs_injector_version = '0.0.1'
xs_injector_description = 'Injector'

# Define sources
xs_injector_src = [
  'src/main.cpp'
]

# Define dependencies
xs_injector_deps = [
  xs_framework_dep,
]

# Define library
xs_injector_inc = include_directories('include')
xs_injector_lib = executable(xs_injector_name,
                             xs_injector_src,
                             include_directories : xs_injector_inc,
                             dependencies : xs_injector_deps,
                             install : true)

====================================

xs_framework/meson.build:

pkg_mod = import('pkgconfig')

xs_framework_name = 'xs_framework'
xs_framework_version = '0.0.1'
xs_framework_description = 'XS Framework'

# Define c++ compile args
xs_framework_cpp_args = []

# Define sources
xs_framework_src = [
  'src/xs_framework.cpp',
]

# Define dependencies
xs_framework_deps = [
  dependency('boost', modules : [])
]

# Define library
xs_framework_inc = include_directories('include', 'pch')
xs_framework_lib = library(xs_framework_name,
                           xs_framework_src,
                           include_directories : xs_framework_inc,
                           version : xs_framework_version,
                           dependencies : xs_framework_deps,
                           cpp_args : xs_framework_cpp_args,
                           cpp_pch : 'pch/xs_pch.hpp',
                           install : true)

# Declare dependencies for this library
xs_framework_dep = declare_dependency(dependencies: xs_framework_deps,
                                      include_directories : xs_framework_inc,
                                      link_with : xs_framework_lib,
                                      compile_args : xs_framework_cpp_args,
                                      version : xs_framework_version)
# Generate PkgConfig
pkg_mod.generate(xs_framework_lib,
                 version : xs_framework_version,
                 name : 'lib' + xs_framework_name,
                 filebase : xs_framework_name,
                 description : xs_framework_description)

# Add Unit-Tests
# subdir('test')

Custom environment variables for meson configuration

Meson requires PKG_CONFIG_PATH to find some dependencies, and even though I setup my PS profile to include this var, I cannot set it as the default shell, as it breaks many Linux tooling. Currently I can't seem to find a way to tell the extension to include extra env vars during the configuration step.

Non default build folder.

If build folder is other than "builddir", "Could not fetch targets. See Meson Build output tab for more info." information is shown while a mason task is run. The "Mason Build" output shows "false" only, instead of an information about the issue.

Moving this extension to the official meson project?

Hi, I'm on of the upstream meson developers, and a vscode user. This extension is the defacto standard for meson-vscode integration, and I'd really like to see it move forward, as a part of the meson project itself. Github has a feature that allows a repo to be transferred into a project, which helps with issues like forks continuing to point to the right place.

I believe that I would either have to be added as an owner of this repo, or the repo would first have to be transferred to me to be able to move it to the meson project. If you're interested please let me know.

Can only detect one project per workspace

I have a workspace with my main app and a couple of libraries that are being developed in parallel as subprojects. Unfortunately the extension is only detecting a single project, and in this case it's one of the libraries and not the main app, which is inconvenient as that's the part which changes the most.

Would it be possible to support multiple meson projects in the same instance, or at least provide a way of switching the current project?

I'm not sure if it's a bug

host pc:ubuntu 20.04
vs code:1.66.2
vscode logs:
{
"error": {
"killed": false,
"code": 2,
"signal": null,
"cmd": "meson setup --buildtype=debug --pkg-config-path=/maxvision/opt/gstreamer/amd64/debug/lib/x86_64-linux-gnu/pkgconfig /maxvision/src/gstreamer/gst-template/builddir"
},
"stdout": "",
"stderr": "usage: meson setup [-h] [--prefix PREFIX] [--bindir BINDIR] [--datadir DATADIR]
[--includedir INCLUDEDIR] [--infodir INFODIR]
[--libdir LIBDIR] [--libexecdir LIBEXECDIR]
[--localedir LOCALEDIR] [--localstatedir LOCALSTATEDIR]
[--mandir MANDIR] [--sbindir SBINDIR]
[--sharedstatedir SHAREDSTATEDIR] [--sysconfdir SYSCONFDIR]
[--auto-features {enabled,disabled,auto}]
[--backend {ninja,vs,vs2010,vs2012,vs2013,vs2015,vs2017,vs2019,vs2022,xcode}]
[--buildtype {plain,debug,debugoptimized,release,minsize,custom}]
[--debug] [--default-library {shared,static,both}]
[--errorlogs] [--install-umask INSTALL_UMASK]
[--layout {mirror,flat}] [--optimization {0,g,1,2,3,s}]
[--stdsplit] [--strip] [--unity {on,off,subprojects}]
[--unity-size UNITY_SIZE] [--warnlevel {0,1,2,3}] [--werror]
[--wrap-mode {default,nofallback,nodownload,forcefallback,nopromote}]
[--force-fallback-for FORCE_FALLBACK_FOR]
[--python.install-env {auto,prefix,system,venv}]
[--python.platlibdir PYTHON.PLATLIBDIR]
[--python.purelibdir PYTHON.PURELIBDIR]
[--pkg-config-path PKG_CONFIG_PATH]
[--build.pkg-config-path BUILD.PKG_CONFIG_PATH]
[--cmake-prefix-path CMAKE_PREFIX_PATH]
[--build.cmake-prefix-path BUILD.CMAKE_PREFIX_PATH]
[-D option] [--native-file NATIVE_FILE]
[--cross-file CROSS_FILE] [--vsenv] [-v]
[--fatal-meson-warnings] [--reconfigure] [--wipe]
[builddir] [sourcedir]
meson setup: error: argument --buildtype: invalid choice: 'debug --pkg-config-path=/maxvision/opt/gstreamer/amd64/debug/lib/x86_64-linux-gnu/pkgconfig' (choose from 'plain', 'debug', 'debugoptimized', 'release', 'minsize', 'custom')"
}
mesonbuild.configure {
"value": "mesonbuild.mesonbuild",
"_lower": "mesonbuild.mesonbuild"
}

single run cmd:meson setup --buildtype=debug --pkg-config-path=/maxvision/opt/gstreamer/amd64/debug/lib/x86_64-linux-gnu/pkgconfig /maxvision/src/gstreamer/gst-template/builddir is ok
vscode + meson external is error

Configuration is not working

I am using this extension from openvsx in OSS Code, specifically version 1.9.0. When I go to the meson tab and click "Meson: Configure", I get the notification on the bottom right that configuration is done. Yet, it isn't done, nothing has happened at all. I can manually force configuration with meson setup $builddir in a terminal, but not via the extension.

I can also do something like

...
my_exe = executable(...)
test('basic', my_exe)

configure via the terminal, then remove that line, click "Meson: Configure", and try to run that test (which the extension thinks is still there despite configuring).

I'm uncertain how to debug this if it's not reproducible, but I'm willing to try given some instructions.

Other info:

Executable targets fail on windows

I'm using Meson on MingW.
Configure fails, but once it's configured in the Mingw shell, targets build works. But not for executables.

The extension tries (i.e) src\executable, so I get ninja: error: unknown target 'src\executable'.

It should try src\executable.exe.

No option to build all targets/run all tests

Looking at the extension page I see:
image

I can click on an individual target and meson will build it, but I don't see an option to do a "build all", or equivalent to meson compile -C $builddir. I can see that #103 is in progress so I won't ask about multiple configurations, but that's also something I don't see.

Compared to the cmake module, this seems lacking:
image

In that menu there are options for:

  • Configure all
  • Build All
  • (in the drop down menu) Clean All, Rebuild All

They also have some nice things along the bottom bar as well:
image

Clicking on "Build" there would be equivalent to build from the extension menu in the workspace.

Linter runs on all files, not just meson build files

OS: Fedora 38
vscode: 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06)

When enabling linting with muon, the linter starts targeting all files in the project, reporting errors on json files and cpp sources. Is there a way to specify which files muon is supposed to check? (And that should maybe default to only list meson.build files)

[feature request] Switch toolchain or corss-file on GUI

I hope there is a select box on vscode GUI to select the toolchain or cross-file to use, and this selected file should be appended as an argument to meson command line, just like the "CMake Tools" does(extension id: ms-vscode.cmake-tools)

Error fetching targets on projects with subdirs

Issue Type: Bug

If project only contains subdirs in its root , it seems that meson extension has trouble fetching targets.

Extension version: 1.2.0
VS Code version: Code - Insiders 1.39.0-insider (695ee74864ef93d10f5de0861cb66af190e76211, 2019-10-02T08:56:48.092Z)
OS version: Windows_NT x64 10.0.17763
Remote OS version: Linux x64 4.15.0-65-generic

ERR command 'mesonbuild.targets-refresh' not found

Hey,
Im getting this error in the VSCode DevTools. It may be related to this issue: #8

workbench.main.js:238 [Extension Host] stack trace: Error: command 'mesonbuild.targets-refresh' not found
    at Proxy._tryExecuteCommand (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:3034:836)
    at r.then.i (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:3034:717)
    at process._tickCallback (internal/process/next_tick.js:68:7)
t.log @ workbench.main.js:238
workbench.main.js:1406   ERR command 'mesonbuild.targets-refresh' not found: Error: command 'mesonbuild.targets-refresh' not found
    at Proxy._tryExecuteCommand (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:3034:836)
    at r.then.i (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:3034:717)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Cannot build library targets

A error is reported that the target cannot be found when building library targets. It looks like the issue is that the name of file built does not match the target name due to the suffix.

I have attached a sample project that demonstrates the issue. The all and SimpleMathsMain targets can be built using the plus whereas the SimpleMaths target cannot.

Thanks for an excellent additional to VS Code.

SimpleMaths.zip

Please add support for comments.

I would like to be able toggle comments in meson.build files but this plugin doesn't seem to support that.
Could you please add?

Test output should be easier to view

I find it difficult to find the test log output when using the Meson test controller; maybe I'm not looking for it in the right place.

When I've run the "Test: Show Output" command, the meson tests usually just show "The test run did not record any output". Also, the few times I did get it to display the test output, the lines were not properly line-wrapped in the display. The display format does require you to replace newlines with \r\n; see the doc here: https://code.visualstudio.com/api/extension-guides/testing#test-output

The vscode-python extension creates a separate vscode OutputChannel for its tests and uses that, so you can go to the Output pane and select the "Python Test Log" channel in the dropdown. This makes it very easy to find the test output. Creating one of those for the Meson tests might be a big win.

I will say that the Python extension's implementation to create and wire it in is a bit complex, but I don't think that's really necessary.

Sidebar broken by package.json name change

Sidebar now complains about "Extension not found" since 0f4aa1c and is completely empty. Putting the name back to "meson" instead of "mesonbuild" and all is well...

I'd have thought it would be a pretty simple fix, but after spending 10 mins on it I can't track down whatever references to "meson" might also need updating.

Anyway, I might find some time to keep looking but I thought I'd mention it in case you know the fix or want to reverse the change and do a new build in the meantime.

[Feature] Configuring the number of parallel jobs

Issue

Ninja, the build system used by Meson, currently uses all available hardware threads + 2 (i.e. logical CPU count + 2) to run compilation jobs in parallel.

This is unsafe on hardware with a high logical CPU count and relatively low available memory. (e.g. on a system with 32 hardware threads but only 32 GiB of memory). As it can cause the following problem

  • Reduce system responsiveness
  • A large number of parallel compilation jobs will quickly consume all available memory, leading to havey swapping, OOM kill and, in the worst case, a system freeze or crash.
  • High usage of all CPU cores can lead to high core temperatures, especially on laptops where the cooling system may not be able to effectively lower the excessive temperature, resulting in potential hardware damage if the compilation takes a long time.

As stated in ninja-build/ninja#1441, there is no mechanism in Ninja where an environment variable can be used to control the number of parallel jobs. So tasks.options.env cannot be used to work around this problem.

Based on my limited and possibly inaccurate observations, the Ninja project won't be adding support for configuring the number of parallel jobs or passing flags via environment variables in the foreseeable future.

My apologies if there are any inaccuracies in the above statements.

Conclusion

In light of the above, it may be considered reasonable and to introduce an option in this extension to conveniently limit the number of parallel jobs in Ninja.

Possible workarounds

  • start vscode with taskset
taskset -c 0-3 code
  • create a shell script wrapper for ninja that passes the -j flag
  • use an alternative implementation of ninja
  • locally patch the ninja source to support ninja flags in environment variables.

Notes

  • tasks.runOptions.instanceLimit is unrelated to limiting parallel Ninja jobs

Thank you very much for generously volunteering your time and skills to contribute to this important project.

Can't build using extension after executable update

Hi,
For a reason, I had to reinstall meson (the executable).
I used pip install meson and since, I didn't manage to build my projects by clicking on the .elf in the extension view as it only show the following message in output view:
image
and the progression pop-up shows a short time before disappearing without more details about the success or fail of the build...

I tried running Meson: Configure but I get the message:
image

Running with command lines works fine.

Am I the only one having this kind of issue?
Thanks

Host OS: Win10
VSC version: 1.68.1
Meson: 0.62.2
Extension: 1.6.0

Add install as a TaskDefinition

Currently the TaskDefinitions that can be called are:
build, configure, reconfigure, clean, run unit tests and run benchmarks.
An option to call meson install would be a nice improvement

[Feature] Integrate language server

I wrote a language server for meson: https://github.com/JCWasmx86/Swift-MesonLSP (GPLv3, but currently trivially changeable as I'm the only contributor)

This is a tracking issue for integration in this extension.

Requirements

  • No licensing issues
  • Works on Windows (A bit untested compared to Linux/MacOS)
  • Works on Linux
  • Works on MacOS
  • Binaries are attached to releases

Runtime dependencies

  • muon for formatting
  • wget or curl for downloading file wraps/patches
  • git/hg/svn for downloading the VCS wraps
  • git or patch for applying patches

Open questions

  • How to ship it using distro mechanisms on Linux?
  • Should muon and Swift-MesonLSP be XOR? Swift-MesonLSP uses muon for formatting and duplicates a lot of work from there. So you would have e.g. duplicate diagnostics
  • Do I have to ship licenses in the .zip files, as on Windows I ship DLLs from the swift project? (I simply do it)

I made a fork of vscode-meson for testing: https://github.com/JCWasmx86/vscode-meson

error: ModuleNotFoundError: No module named '_bootlocale'.

When trying out the basic example found on the meson tutorial page, when running the meson builddir command. I get the following error: ModuleNotFoundError: No module named '_bootlocale'.

The output:

The Meson build system
Version: 0.60.1
Source dir: C:\LEFTOUT\meson_local_target_test_build
Build dir: C:\LEFTOUT\meson_local_target_test_build\builddir
Build type: native build
Project name: meson_local_target_test
Project version: 1.0
Traceback (most recent call last):
  File "mesonbuild\mesonmain.py", line 138, in run
  File "mesonbuild\msetup.py", line 294, in run
  File "mesonbuild\msetup.py", line 185, in generate
  File "mesonbuild\msetup.py", line 207, in _generate
  File "mesonbuild\interpreter\interpreter.py", line 297, in __init__
  File "mesonbuild\interpreterbase\interpreterbase.py", line 118, in parse_project
  File "mesonbuild\interpreterbase\interpreterbase.py", line 173, in evaluate_codeblock
  File "mesonbuild\interpreterbase\interpreterbase.py", line 166, in evaluate_codeblock
  File "mesonbuild\interpreterbase\interpreterbase.py", line 179, in evaluate_statement
  File "mesonbuild\interpreterbase\interpreterbase.py", line 454, in function_call
  File "mesonbuild\interpreterbase\decorators.py", line 115, in wrapped
  File "mesonbuild\interpreterbase\decorators.py", line 276, in wrapper
  File "mesonbuild\interpreter\interpreter.py", line 1130, in func_project
  File "mesonbuild\interpreter\interpreter.py", line 1257, in add_languages
  File "mesonbuild\interpreter\interpreter.py", line 1295, in add_languages_for
  File "mesonbuild\compilers\detect.py", line 215, in detect_compiler_for
  File "mesonbuild\compilers\detect.py", line 212, in compiler_from_language
  File "mesonbuild\compilers\detect.py", line 623, in detect_c_compiler
  File "mesonbuild\compilers\detect.py", line 403, in _detect_c_or_cpp_compiler
  File "mesonbuild\mesonlib\universal.py", line 1385, in Popen_safe
  File "locale.py", line 628, in getpreferredencoding
ModuleNotFoundError: No module named '_bootlocale'

Python version: Python 3.10.0
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19041 N/A Build 19041

[feature request] Support `sourcedir` beneath the workspace root for `meson setup`

The configuration options allow the user to pass additional keyword arguments to meson setup. But it always calls the command with only the builddir positional argument.

Would it be difficult to support the sourcedir argument as well? Would this break other parts of the extension?

The use case is a workspace with a single meson.build, but that file is under a subdirectory 'tests'. (The meson build is only used for unit testing; a proprietary build system for the rest of the project). On the command line I can invoke meson setup tests/builddir tests/sourcedir from the root.

Ref: https://mesonbuild.com/Commands.html#setup

"Current project" sidebar is empty for project

I've cloned https://github.com/fwupd/fwupd locally and opened it as a workspace in VS Code. I notice that the "Current Project" sidebar has nothing in it though. Is it supposed to show anything?

Commands like ctrl-shift-p, Meson: configure or Meson: build seem to work though. Not sure if I'm missing out in something on that side bar? This is the first project i'm trying to use it for.

image

run task failed with default layout in mesonbuild.configureOptions

The default layout in mesonbuild.configureOptions is flat, the target file is in the meson-out folder. But when I run the "Meson: Run XXX" task, it try to run target file in build folder. So I got a "No such file" error.
When I modified layout to mirror, it worked fine.
I'm using the last release vscode.
Sorry for my weak English.

Publish to Open VSX

Would it be possible to publish this extension to the Open VSX Registry? This would make it possible to install this extension on VSCode builds not provided by Microsoft (VSCodium, code on Arch Linux, etc)

I don't know if it can help, but the original asabil.meson extension was already there.

The extension does not check whenever meson is in PATH

Attempting to run any extension command without meson in PATH environment variable results in a error ('configure' and 'reconfigure') or results in no response ('build').

runMesonConfigure in meson/runners.ts lacks in any protection clauses against this case.

IMO The extension should check and warn the user whenever meson doesn't exist in PATH.

Expand `${workspaceFolder}` in `mesonbuild.muonPath`

I have a feeling there is a VSCode extension API for this, but I would have to go looking.

{
  "mesonbuild.muonPath": "${workspaceFolder}/build/muon"
}
Failed to enable linter muon: spawn ${workspaceFolder}/build/muon ENOENT

Test Panel empty after v1.8

Since updating to the latest version 1.8.0 and 1.8.1 the test panel is empty, the meson tab is working fine

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.