Merge branch 'fix-72' into 'main'

port: Show error when Gtk typelib is missing

Closes #72

See merge request jwestman/blueprint-compiler!54
This commit is contained in:
James Westman 2022-10-09 15:31:21 +00:00
commit e128b49069
4 changed files with 38 additions and 28 deletions

View file

@ -40,17 +40,7 @@ class GtkDirective(AstNode):
err.hint("Expected 'using Gtk 4.0;'")
raise err
try:
gir.get_namespace("Gtk", version)
except CompileError as e:
raise CompileError(
"Could not find GTK 4 introspection files. Is gobject-introspection installed?",
fatal=True,
# preserve the hints from the original error, because it contains
# useful debugging information
hints=e.hints,
)
gir.get_namespace("Gtk", version)
@property
def gir_namespace(self):