Skip to content
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

Vala: target introspection doesn't include link_with information #7469

Open
esodan opened this issue Jul 18, 2020 · 0 comments
Open

Vala: target introspection doesn't include link_with information #7469

esodan opened this issue Jul 18, 2020 · 0 comments

Comments

@esodan
Copy link

esodan commented Jul 18, 2020

Describe the bug
If you have a primary library written in Vala, you have a VAPI output; if that is used by another Vala written library in the same project link_with makes the magic to add required valac compiler parameters, but when inspecting meson-info/intro-targets.json there is no --pkg or a direct reference to the VAPI file of the library it is linked with.

This information is useful for IED code completion servers, because they need to know all compilation parameters. The following extraction of meson-info/intro-targets.json shows up how a test case is linked against gvls-0.16 shared library and works, but the introspection information the reference to library's VAPI file is missing so code completion, diagnostics and other services just fails to located used symbols.

{"name": "scan-configuration", "id": "59830eb@@scan-configuration@exe", "type": "executable", "defined_in": "/home/despinosa/Projects/gvls/tests/meson.build", "filename": ["/home/despinosa/Projects/gvls/build/tests/scan-configuration"], "build_by_default": true, "target_sources": [{"language": "vala", "compiler": ["valac"], "parameters": ["-C", "--debug", "--debug", "--abi-stability", "--pkg", "posix", "--pkg", "posix", "--pkg", "posix", "--pkg", "jsonrpc-glib-1.0", "--pkg", "posix", "--pkg", "libvala-0.48", "--pkg", "gio-unix-2.0", "--pkg", "json-glib-1.0", "--pkg", "gee-0.8", "--pkg", "gobject-2.0", "--pkg", "gio-2.0", "--pkg", "glib-2.0", "--color=always", "--directory", "tests/59830eb@@scan-configuration@exe", "--basedir", "../tests", "--vapidir", "/home/despinosa/Projects/gvls/build/tests", "--pkg=config"], "sources": ["/home/despinosa/Projects/gvls/tests/test-scan-configuration.vala"], "generated_sources": []}, {"language": "c", "compiler": ["cc"], "parameters": ["-I/home/despinosa/Projects/gvls/build/tests/59830eb@@scan-configuration@exe", "-I/home/despinosa/Projects/gvls/build/tests", "-I/home/despinosa/Projects/gvls/tests", "-I/home/despinosa/Projects/gvls/build/src", "-I/home/despinosa/Projects/gvls/src", "-I/home/despinosa/Projects/gvls/build/src/lsp", "-I/home/despinosa/Projects/gvls/src/lsp", "-I/home/despinosa/Projects/gvls/build", "-I/home/despinosa/Projects/gvls", "-I/usr/include/glib-2.0", "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", "-I/usr/include/libmount", "-I/usr/include/blkid", "-I/usr/include/gee-0.8", "-I/usr/include/json-glib-1.0", "-I/usr/include/gio-unix-2.0", "-I/usr/include/vala-0.48", "-I/usr/include/jsonrpc-glib-1.0", "-fdiagnostics-color=always", "-pipe", "-D_FILE_OFFSET_BITS=64", "-w", "-g", "-pthread"], "sources": [], "generated_sources": ["/home/despinosa/Projects/gvls/build/tests/59830eb@@scan-configuration@exe/test-scan-configuration.c"]}], "subproject": null, "installed": false}

To Reproduce
There should be an independent library and a dependent library that is linked against the first one. Configure the project and inspect meson-info/intro-targets.json, showing up the missed independent library's VAPI in the paramenters of the dependent libary.

Expected behavior
The parameters should include the VAPI used in the form of --pkg, followed by the VAPI package's name of the independent library and a --vapidir followed by the independent libary's directory where the VAPI is generated. Another option is to have the required VAPI file included in the sources, but is better to include it in the parameters.

system parameters

  • this a plain native build (for the same computer)
  • Ubuntu 20.04 is used
  • Python3 version is 3.8.2
  • Meson version is 0.53.2
  • Ninja version is 1.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants