Skip to content

Conversation

@albfan
Copy link
Contributor

@albfan albfan commented Oct 7, 2025

Vala documentation is misleading on generate typelib

This PR tries to offer a working solution meanwhile a better approach is available

relates #2296

@albfan albfan requested a review from jpakkane as a code owner October 7, 2025 15:54
@dcbaker
Copy link
Member

dcbaker commented Oct 7, 2025

Would #14782, which gives you a handle for the generated gir file (with correct ordering), be a proper solution to this?

@albfan
Copy link
Contributor Author

albfan commented Oct 8, 2025

Definitely #14782 is interesting (meson to knowing its build targets), but this tries to workaround a different problem.

if custom target uses an input that is on build dir this errors are shown:

meson setup:

meson.build:36: WARNING: Source item 'build/extensions/Foo-1.0.gir' cannot be converted to File object, because it is a generated file. This will become a hard error in the future.

and building:

meson compile:

ninja: error: 'build/extensions/Foo-1.0.gir', needed by 'extensions/Foo-1.0.typelib', missing and no known rule to make it

Currenty, documentation for vala is wrong, and you can look around for projects using vala libraries and how they link it

https://github.com/akiraux/libgtkcanvas/blob/master/src/meson.build#L88

I will be glad to improve this documentation once related PR are merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants