vala-lang / vala-language-server

Code Intelligence for Vala & Genie
GNU Lesser General Public License v2.1
287 stars 41 forks source link

Issues with Gnome app template #278

Open QazCetelic opened 1 year ago

QazCetelic commented 1 year ago

Describe the bug The language server seems to be unable to detect the dependencies from the build.meson file from the Gnome app template as generated by GNOME Builder. screenshot

src/build.meson

testapp_sources = [
  'main.vala',
  'application.vala',
  'window.vala',
]

testapp_deps = [
  dependency('gtk4'),
  dependency('libadwaita-1'),
]

testapp_sources += gnome.compile_resources('testapp-resources',
  'testapp.gresource.xml',
  c_name: 'testapp'
)

executable('testapp', testapp_sources,
  dependencies: testapp_deps,
       install: true,
)

build.meson

project('testapp', ['c', 'vala'],
          version: '0.1.0',
    meson_version: '>= 0.59.0',
  default_options: [ 'warning_level=2', 'werror=false', ],
)

i18n = import('i18n')
gnome = import('gnome')

subdir('data')
subdir('src')
subdir('po')

gnome.post_install(
     glib_compile_schemas: true,
    gtk_update_icon_cache: true,
  update_desktop_database: true,
)

Software OS and version (e.g. Ubuntu 20.04): Fedora 37 Code editor (e.g. VSCode): VSCode Vala Language Server (e.g. git commit, or PPA/AUR version): 0.48.5-7.1 Vala version (valac --version): Vala 0.56.3

benwaffle commented 1 year ago

Works fine for me. Can you still reproduce the issue on 0.48.7?

QazCetelic commented 1 year ago

0.48.7 isn't available in the Fedora repositories yet. I've tried to build it, but it failed due to some issues with a dependency mismatch (libvala). Is there a prebuild binary? I couldn't find one at the releases page.

benwaffle commented 1 year ago

What compilation/dependency error are you getting? @Prince781 can you trigger a new OBS build for 0.48.7?