Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package blueprint-compiler for openSUSE:Factory checked in at 2025-07-02 18:17:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/blueprint-compiler (Old) and /work/SRC/openSUSE:Factory/.blueprint-compiler.new.7067 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "blueprint-compiler" Wed Jul 2 18:17:18 2025 rev:9 rq:1289818 version:0.18.0 Changes: -------- --- /work/SRC/openSUSE:Factory/blueprint-compiler/blueprint-compiler.changes 2025-03-17 22:20:39.746171702 +0100 +++ /work/SRC/openSUSE:Factory/.blueprint-compiler.new.7067/blueprint-compiler.changes 2025-07-02 18:17:47.032098615 +0200 @@ -1,0 +2,24 @@ +Wed Jul 2 06:10:23 UTC 2025 - Bjørn Lie <bjorn....@gmail.com> + +- Updatet o version 0.18.0: + + Added: GtkBuilder now allows menus to be specified inline as a + property value. Blueprint now supports this as well. + + Fixed: + - Made reference_docs.json build reproducible + - Correctly emit XML for nested templates + - Fix crash in language server while typing an + AdwBreakpointSetter rule + - Update URLs after move to GNOME namespace on GitLab + - Fix crash when decompiling a lookup tag with no type + attribute + - Fix incorrect result when decompiling a signal that has the + template as its object + - Fix an incorrect "Duplicate object ID" error when an + Adw.AlertDialog response had the same ID as an object + + Documentation: + - Updated syntax in the example on the Overview page + - Added examples of Gtk.Scale marks + - Corrected errors in the index on the Extensions page +- Update URL to new home. + +------------------------------------------------------------------- Old: ---- blueprint-compiler-0.16.0.tar.gz New: ---- blueprint-compiler-0.18.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ blueprint-compiler.spec ++++++ --- /var/tmp/diff_new_pack.7Gppnc/_old 2025-07-02 18:17:47.600122216 +0200 +++ /var/tmp/diff_new_pack.7Gppnc/_new 2025-07-02 18:17:47.604122382 +0200 @@ -23,11 +23,11 @@ %endif Name: blueprint-compiler -Version: 0.16.0 +Version: 0.18.0 Release: 0 Summary: A markup language for GTK user interfaces License: LGPL-3.0-or-later -URL: https://gitlab.gnome.org/jwestman/blueprint-compiler +URL: https://gitlab.gnome.org/GNOME/blueprint-compiler Source: %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module base >= 3.10} ++++++ blueprint-compiler-0.16.0.tar.gz -> blueprint-compiler-0.18.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/.gitlab-ci.yml new/blueprint-compiler-v0.18.0/.gitlab-ci.yml --- old/blueprint-compiler-v0.16.0/.gitlab-ci.yml 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/.gitlab-ci.yml 2025-07-02 04:12:35.000000000 +0200 @@ -1,9 +1,21 @@ +include: + - component: "gitlab.gnome.org/GNOME/citemplates/release-service@master" + inputs: + job-stage: "release" + dist-job-name: "build-release-tarball" + tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}" + stages: - build +- release - pages +variables: + MESON_BUILD_DIR: "_build" + TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz" + build: - image: registry.gitlab.gnome.org/jwestman/blueprint-compiler + image: registry.gitlab.gnome.org/gnome/blueprint-compiler stage: build script: - black --check --diff ./ tests @@ -33,7 +45,7 @@ path: coverage.xml fuzz: - image: registry.gitlab.gnome.org/jwestman/blueprint-compiler + image: registry.gitlab.gnome.org/gnome/blueprint-compiler stage: build script: - meson _build @@ -45,6 +57,18 @@ - corpus - crashes +build-release-tarball: + stage: build + image: registry.gitlab.gnome.org/gnome/blueprint-compiler + script: + - meson setup "${MESON_BUILD_DIR}" + - xvfb-run meson dist -C "${MESON_BUILD_DIR}" --include-subprojects + artifacts: + name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" + when: "always" + paths: + - "${TARBALL_ARTIFACT_PATH}" + pages: stage: pages dependencies: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/MAINTENANCE.md new/blueprint-compiler-v0.18.0/MAINTENANCE.md --- old/blueprint-compiler-v0.16.0/MAINTENANCE.md 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/MAINTENANCE.md 2025-07-02 04:12:35.000000000 +0200 @@ -8,7 +8,7 @@ 3. Make a new commit with just these two changes. Use `Release v{version}` as the commit message. Tag the commit as `v{version}` and push the tag. 4. Create a "Post-release version bump" commit. 5. Go to the Releases page in GitLab and create a new release from the tag. -6. Announce the release through relevant channels (Twitter, TWIG, etc.) +6. Announce the release through relevant channels (Mastodon, TWIG, etc.) ## Related projects diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/NEWS.md new/blueprint-compiler-v0.18.0/NEWS.md --- old/blueprint-compiler-v0.16.0/NEWS.md 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/NEWS.md 2025-07-02 04:12:35.000000000 +0200 @@ -1,3 +1,22 @@ +# v0.18.0 + +## Added +- GtkBuilder now allows menus to be specified inline as a property value. Blueprint now supports this as well. + +## Fixed +- Made reference_docs.json build reproducible (Sertonix) +- Correctly emit XML for nested templates (Tom Greig) +- Fix crash in language server while typing an AdwBreakpointSetter rule +- Update URLs after move to GNOME namespace on GitLab +- Fix crash when decompiling a lookup tag with no type attribute +- Fix incorrect result when decompiling a signal that has the template as its object +- Fix an incorrect "Duplicate object ID" error when an Adw.AlertDialog response had the same ID as an object + +## Documentation +- Updated syntax in the example on the Overview page (Chris Mayo) +- Added examples of Gtk.Scale marks (Matthijs Velsink) +- Corrected errors in the index on the Extensions page (Matthijs Velsink) + # v0.16.0 ## Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/README.md new/blueprint-compiler-v0.18.0/README.md --- old/blueprint-compiler-v0.16.0/README.md 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/README.md 2025-07-02 04:12:35.000000000 +0200 @@ -82,10 +82,6 @@ - [Blueprint Language Plugin by bodil](https://github.com/bodil/vscode-blueprint) -## Donate - -You can support my work on GitHub Sponsors! <https://github.com/sponsors/jameswestman> - ## Getting in Touch Matrix room: [#blueprint-language:matrix.org](https://matrix.to/#/#blueprint-language:matrix.org) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprint-compiler.doap new/blueprint-compiler-v0.18.0/blueprint-compiler.doap --- old/blueprint-compiler-v0.16.0/blueprint-compiler.doap 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprint-compiler.doap 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,27 @@ +<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:foaf="http://xmlns.com/foaf/0.1/" + xmlns:gnome="http://api.gnome.org/doap-extensions#" + xmlns="http://usefulinc.com/ns/doap#"> + + <name xml:lang="en">Blueprint</name> + <shortdesc xml:lang="en">A modern language for creating GTK interfaces</shortdesc> + <description xml:lang="en">Blueprint is a language and associated tooling for building user interfaces for GTK.</description> + <category rdf:resource="http://api.gnome.org/doap-extensions#apps" /> + <programming-language>Python</programming-language> + + <homepage + rdf:resource="https://gnome.gitlab.gnome.org/blueprint-compiler/" /> + <download-page + rdf:resource="https://gitlab.gnome.org/GNOME/blueprint-compiler/-/releases" /> + <bug-database + rdf:resource="https://gitlab.gnome.org/GNOME/blueprint-compiler/issues" /> + + <maintainer> + <foaf:Person> + <foaf:name>James Westman</foaf:name> + <foaf:mbox rdf:resource="mailto:ja...@jwestman.net" /> + <gnome:userid>jwestman</gnome:userid> + </foaf:Person> + </maintainer> +</Project> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/decompiler.py new/blueprint-compiler-v0.18.0/blueprintcompiler/decompiler.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/decompiler.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/decompiler.py 2025-07-02 04:12:35.000000000 +0200 @@ -255,7 +255,11 @@ ctx._node_stack.append(xml) ctx.start_block() - gir = decompiler(*args, **kwargs) + + try: + gir = decompiler(*args, **kwargs) + except TypeError as e: + raise UnsupportedError(tag=xml.tag) if not decompiler._skip_children: for child in xml.children: @@ -266,8 +270,6 @@ except UnsupportedError as e: raise e - except TypeError as e: - raise UnsupportedError(tag=xml.tag) def decompile(data: str) -> str: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/errors.py new/blueprint-compiler-v0.18.0/blueprintcompiler/errors.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/errors.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/errors.py 2025-07-02 04:12:35.000000000 +0200 @@ -219,7 +219,7 @@ f"""{Colors.BOLD}{Colors.RED}***** COMPILER BUG ***** The blueprint-compiler program has crashed. Please report the above stacktrace, along with the input file(s) if possible, on GitLab: -{Colors.BOLD}{Colors.BLUE}{Colors.UNDERLINE}https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/new?issue +{Colors.BOLD}{Colors.BLUE}{Colors.UNDERLINE}https://gitlab.gnome.org/GNOME/blueprint-compiler/-/issues/new?issue {Colors.CLEAR}""" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/interactive_port.py new/blueprint-compiler-v0.18.0/blueprintcompiler/interactive_port.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/interactive_port.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/interactive_port.py 2025-07-02 04:12:35.000000000 +0200 @@ -71,7 +71,7 @@ print( f"""{Colors.FAINT}Either the original XML file had an error, or there is a bug in the porting tool. If you think it's a bug (which is likely), please file an issue on GitLab: -{Colors.BLUE}{Colors.UNDERLINE}https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/new?issue{Colors.CLEAR}\n""" +{Colors.BLUE}{Colors.UNDERLINE}https://gitlab.gnome.org/GNOME/blueprint-compiler/-/issues/new?issue{Colors.CLEAR}\n""" ) return CouldNotPort("does not compile") @@ -136,7 +136,7 @@ wrap.write( f"""[wrap-git] directory = blueprint-compiler -url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git +url = https://gitlab.gnome.org/GNOME/blueprint-compiler.git revision = {VERSION} depth = 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/adw_breakpoint.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/adw_breakpoint.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/adw_breakpoint.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/adw_breakpoint.py 2025-07-02 04:12:35.000000000 +0200 @@ -81,8 +81,8 @@ return self.tokens["property"] @property - def value(self) -> Value: - return self.children[Value][0] + def value(self) -> T.Optional[Value]: + return self.children[Value][0] if len(self.children[Value]) > 0 else None @property def gir_class(self) -> T.Optional[GirType]: @@ -106,7 +106,10 @@ return None @property - def document_symbol(self) -> DocumentSymbol: + def document_symbol(self) -> T.Optional[DocumentSymbol]: + if self.value is None: + return None + return DocumentSymbol( f"{self.object_id}.{self.property_name}", SymbolKind.Property, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/contexts.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/contexts.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/contexts.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/contexts.py 2025-07-02 04:12:35.000000000 +0200 @@ -60,19 +60,21 @@ passed = {} for obj in self._iter_recursive(self.node): - if obj.tokens["id"] is None: + from .gtk_menu import Menu + + if not (isinstance(obj, Object) or isinstance(obj, Menu)) or obj.id is None: continue - if obj.tokens["id"] in passed: + if obj.id in passed: token = obj.group.tokens["id"] if not isinstance(obj, Template) and not isinstance( obj, ExtListItemFactory ): raise CompileError( - f"Duplicate object ID '{obj.tokens['id']}'", + f"Duplicate object ID '{obj.id}'", token.range, ) - passed[obj.tokens["id"]] = obj + passed[obj.id] = obj def _iter_recursive(self, node: AstNode): yield node diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/expression.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/expression.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/expression.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/expression.py 2025-07-02 04:12:35.000000000 +0200 @@ -302,12 +302,18 @@ @decompiler("lookup", skip_children=True, cdata=True) def decompile_lookup( - ctx: DecompileCtx, gir: gir.GirContext, cdata: str, name: str, type: str + ctx: DecompileCtx, + gir: gir.GirContext, + cdata: str, + name: str, + type: T.Optional[str] = None, ): if ctx.parent_node is not None and ctx.parent_node.tag == "property": ctx.print("expr ") - if t := ctx.type_by_cname(type): + if type is None: + type = "" + elif t := ctx.type_by_cname(type): type = decompile.full_name(t) else: type = "$" + type @@ -327,7 +333,7 @@ if constant == ctx.template_class: ctx.print("template." + name) elif constant == "": - ctx.print("item as <" + type + ">." + name) + ctx.print(f"item as <{type}>.{name}") else: ctx.print(constant + "." + name) return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gobject_property.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gobject_property.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gobject_property.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gobject_property.py 2025-07-02 04:12:35.000000000 +0200 @@ -21,12 +21,15 @@ from .binding import Binding from .common import * from .contexts import ValueTypeCtx +from .gtk_menu import menu from .values import ArrayValue, ExprValue, ObjectValue, Value class Property(AstNode): grammar = Statement( - UseIdent("name"), ":", AnyOf(Binding, ExprValue, ObjectValue, Value, ArrayValue) + UseIdent("name"), + ":", + AnyOf(Binding, ExprValue, menu, ObjectValue, Value, ArrayValue), ) @property diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gobject_signal.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gobject_signal.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gobject_signal.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gobject_signal.py 2025-07-02 04:12:35.000000000 +0200 @@ -225,8 +225,14 @@ @decompiler("signal") -def decompile_signal(ctx, gir, name, handler, swapped=None, after="false", object=None): +def decompile_signal( + ctx: DecompileCtx, gir, name, handler, swapped=None, after="false", object=None +): object_name = object or "" + + if object_name == ctx.template_class: + object_name = "template" + name = name.replace("_", "-") line = f"{name} => ${handler}({object_name})" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gtk_menu.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gtk_menu.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/gtk_menu.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/gtk_menu.py 2025-07-02 04:12:35.000000000 +0200 @@ -60,11 +60,6 @@ def items(self) -> T.List[T.Union["Menu", "MenuAttribute"]]: return self.children - @validate("menu") - def has_id(self): - if self.tokens["tag"] == "menu" and self.tokens["id"] is None: - raise CompileError("Menu requires an ID") - @validate("id") def object_id_not_reserved(self): if self.id in RESERVED_IDS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/language/values.py new/blueprint-compiler-v0.18.0/blueprintcompiler/language/values.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/language/values.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/language/values.py 2025-07-02 04:12:35.000000000 +0200 @@ -225,12 +225,12 @@ return self.tokens["value"] @property - def value(self) -> T.Optional[int]: + def value(self) -> T.Optional[str]: type = self.context[ValueTypeCtx].value_type if not isinstance(type, Enumeration): return None elif member := type.members.get(self.name): - return member.value + return member.nick else: return None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/outputs/xml/__init__.py new/blueprint-compiler-v0.18.0/blueprintcompiler/outputs/xml/__init__.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/outputs/xml/__init__.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/outputs/xml/__init__.py 2025-07-02 04:12:35.000000000 +0200 @@ -139,6 +139,11 @@ self._emit_expression(value.expression, xml) xml.end_tag() + elif isinstance(value, Menu): + xml.start_tag("property", **props) + self._emit_menu(value, xml) + xml.end_tag() + elif isinstance(value, ObjectValue): xml.start_tag("property", **props) self._emit_object(value.object, xml) @@ -308,6 +313,9 @@ elif isinstance(extension, AdwBreakpointSetters): for setter in extension.setters: + if setter.value is None: + continue + attrs = {} if isinstance(setter.value.child, Translated): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/outputs/xml/xml_emitter.py new/blueprint-compiler-v0.18.0/blueprintcompiler/outputs/xml/xml_emitter.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/outputs/xml/xml_emitter.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/outputs/xml/xml_emitter.py 2025-07-02 04:12:35.000000000 +0200 @@ -73,6 +73,7 @@ self._needs_newline = False def put_cdata(self, text: str): + text = text.replace("]]>", "]]]]><![CDATA[>") self.result += f"<![CDATA[{text}]]>" self._needs_newline = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/blueprintcompiler/parse_tree.py new/blueprint-compiler-v0.18.0/blueprintcompiler/parse_tree.py --- old/blueprint-compiler-v0.16.0/blueprintcompiler/parse_tree.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/blueprintcompiler/parse_tree.py 2025-07-02 04:12:35.000000000 +0200 @@ -17,7 +17,7 @@ # # SPDX-License-Identifier: LGPL-3.0-or-later -""" Utilities for parsing an AST from a token stream. """ +"""Utilities for parsing an AST from a token stream.""" import typing as T from enum import Enum diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/collect-sections.py new/blueprint-compiler-v0.18.0/docs/collect-sections.py --- old/blueprint-compiler-v0.16.0/docs/collect-sections.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/collect-sections.py 2025-07-02 04:12:35.000000000 +0200 @@ -9,7 +9,7 @@ __all__ = ["get_docs_section"] -DOCS_ROOT = "https://jwestman.pages.gitlab.gnome.org/blueprint-compiler" +DOCS_ROOT = "https://gnome.pages.gitlab.gnome.org/blueprint-compiler" sections: dict[str, "Section"] = {} @@ -132,5 +132,8 @@ # print the sections to a json file with open(outfile, "w") as f: json.dump( - {name: section.to_json() for name, section in sections.items()}, f, indent=2 + {name: section.to_json() for name, section in sections.items()}, + f, + indent=2, + sort_keys=True, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/flatpak.rst new/blueprint-compiler-v0.18.0/docs/flatpak.rst --- old/blueprint-compiler-v0.16.0/docs/flatpak.rst 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/flatpak.rst 2025-07-02 04:12:35.000000000 +0200 @@ -16,8 +16,8 @@ "sources": [ { "type": "git", - "url": "https://gitlab.gnome.org/jwestman/blueprint-compiler", - "tag": "v0.16.0" + "url": "https://gitlab.gnome.org/GNOME/blueprint-compiler", + "tag": "v0.18.0" } ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/index.rst new/blueprint-compiler-v0.18.0/docs/index.rst --- old/blueprint-compiler-v0.16.0/docs/index.rst 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/index.rst 2025-07-02 04:12:35.000000000 +0200 @@ -26,7 +26,7 @@ using Gtk 4.0; - template MyAppWindow : ApplicationWindow { + template $MyAppWindow: ApplicationWindow { default-width: 600; default-height: 300; title: _("Hello, Blueprint!"); @@ -35,7 +35,7 @@ HeaderBar {} Label { - label: bind MyAppWindow.main_text; + label: bind template.main_text; } } @@ -59,7 +59,7 @@ Links ----- -- `Source code <https://gitlab.gnome.org/jwestman/blueprint-compiler>`_ +- `Source code <https://gitlab.gnome.org/GNOME/blueprint-compiler>`_ - `Workbench <https://github.com/sonnyp/Workbench>`_ lets you try, preview and export Blueprint - `GNOME Builder <https://developer.gnome.org/documentation/introduction/builder.html>`_ provides builtin support - `Vim syntax highlighting plugin by thetek42 <https://github.com/thetek42/vim-blueprint-syntax>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/reference/extensions.rst new/blueprint-compiler-v0.18.0/docs/reference/extensions.rst --- old/blueprint-compiler-v0.16.0/docs/reference/extensions.rst 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/reference/extensions.rst 2025-07-02 04:12:35.000000000 +0200 @@ -10,20 +10,21 @@ Extensions are a feature of ``Gtk.Buildable``--see `Gtk.Buildable.custom_tag_start() <https://docs.gtk.org/gtk4/vfunc.Buildable.custom_tag_start.html>`_ for internal details. - Because they aren't part of the type system, they aren't present in typelib files like properties and signals are. Therefore, if a library adds a new extension, syntax for it must be added to Blueprint manually. If there's a commonly used extension that isn't supported by Blueprint, please `file an issue <https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues>`_. + Because they aren't part of the type system, they aren't present in typelib files like properties and signals are. Therefore, if a library adds a new extension, syntax for it must be added to Blueprint manually. If there's a commonly used extension that isn't supported by Blueprint, please `file an issue <https://gitlab.gnome.org/GNOME/blueprint-compiler/-/issues>`_. .. rst-class:: grammar-block Extension = :ref:`ExtAccessibility<Syntax ExtAccessibility>` | :ref:`ExtAdwAlertDialog<Syntax ExtAdwAlertDialog>` - | :ref:`ExtAdwMessageDialog<Syntax ExtAdwMessageDialog>` | :ref:`ExtAdwBreakpoint<Syntax ExtAdwBreakpoint>` + | :ref:`ExtAdwMessageDialog<Syntax ExtAdwMessageDialog>` | :ref:`ExtComboBoxItems<Syntax ExtComboBoxItems>` | :ref:`ExtFileFilterMimeTypes<Syntax ExtFileFilter>` | :ref:`ExtFileFilterPatterns<Syntax ExtFileFilter>` | :ref:`ExtFileFilterSuffixes<Syntax ExtFileFilter>` | :ref:`ExtLayout<Syntax ExtLayout>` | :ref:`ExtListItemFactory<Syntax ExtListItemFactory>` + | :ref:`ExtScaleMarks<Syntax ExtScaleMarks>` | :ref:`ExtSizeGroupWidgets<Syntax ExtSizeGroupWidgets>` | :ref:`ExtStringListStrings<Syntax ExtStringListStrings>` | :ref:`ExtStyles<Syntax ExtStyles>` @@ -47,25 +48,6 @@ Relations which allow for a list of values, for example `labelled-by`, must be given as a single relation with a list of values instead of duplicating the relation like done in Gtk.Builder. -.. _Syntax ExtAdwBreakpoint: - -Adw.Breakpoint --------------- - -.. rst-class:: grammar-block - - ExtAdwBreakpointCondition = 'condition' '(' <condition::ref:`QUOTED<Syntax QUOTED>`> ')' - ExtAdwBreakpoint = 'setters' '{' ExtAdwBreakpointSetter* '}' - ExtAdwBreakpointSetter = <object::ref:`IDENT<Syntax IDENT>`> '.' <property::ref:`IDENT<Syntax IDENT>`> ':' :ref:`Value <Syntax Value>` ';' - -Valid in `Adw.Breakpoint <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html>`_. - -Defines the condition for a breakpoint and the properties that will be set at that breakpoint. See the documentation for `Adw.Breakpoint <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html>`_. - -.. note:: - - The `Adw.Breakpoint:condition <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/property.Breakpoint.condition.html>`_ property has type `Adw.BreakpointCondition <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/struct.BreakpointCondition.html>`_, which GtkBuilder doesn't know how to parse from a string. Therefore, the ``condition`` syntax is used instead. - .. _Syntax ExtAdwAlertDialog: @@ -96,6 +78,26 @@ } +.. _Syntax ExtAdwBreakpoint: + +Adw.Breakpoint +-------------- + +.. rst-class:: grammar-block + + ExtAdwBreakpointCondition = 'condition' '(' <condition::ref:`QUOTED<Syntax QUOTED>`> ')' + ExtAdwBreakpoint = 'setters' '{' ExtAdwBreakpointSetter* '}' + ExtAdwBreakpointSetter = <object::ref:`IDENT<Syntax IDENT>`> '.' <property::ref:`IDENT<Syntax IDENT>`> ':' :ref:`Value <Syntax Value>` ';' + +Valid in `Adw.Breakpoint <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html>`_. + +Defines the condition for a breakpoint and the properties that will be set at that breakpoint. See the documentation for `Adw.Breakpoint <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html>`_. + +.. note:: + + The `Adw.Breakpoint:condition <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/property.Breakpoint.condition.html>`_ property has type `Adw.BreakpointCondition <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/struct.BreakpointCondition.html>`_, which GtkBuilder doesn't know how to parse from a string. Therefore, the ``condition`` syntax is used instead. + + .. _Syntax ExtAdwMessageDialog: Adw.MessageDialog Responses @@ -262,6 +264,16 @@ The ``marks`` block defines the marks on a scale. A single ``mark`` has up to three arguments: a value, an optional position, and an optional label. The position can be ``left``, ``right``, ``top``, or ``bottom``. The label may be translated. +.. code-block:: blueprint + + Scale { + marks [ + mark (-1, bottom), + mark (0, top, _("Origin")), + mark (2), + ] + } + .. _Syntax ExtSizeGroupWidgets: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/reference/objects.rst new/blueprint-compiler-v0.18.0/docs/reference/objects.rst --- old/blueprint-compiler-v0.16.0/docs/reference/objects.rst 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/reference/objects.rst 2025-07-02 04:12:35.000000000 +0200 @@ -58,7 +58,7 @@ .. rst-class:: grammar-block - Property = <name::ref:`IDENT<Syntax IDENT>`> ':' ( :ref:`Binding<Syntax Binding>` | :ref:`ExprValue<Syntax ExprValue>` | :ref:`ObjectValue<Syntax ObjectValue>` | :ref:`Value<Syntax Value>` ) ';' + Property = <name::ref:`IDENT<Syntax IDENT>`> ':' ( :ref:`Binding<Syntax Binding>` | :ref:`ExprValue<Syntax ExprValue>` | :ref:`Menu<Syntax Menu>` | :ref:`ObjectValue<Syntax ObjectValue>` | :ref:`Value<Syntax Value>` ) ';' Properties specify the details of each object, like a label's text, an image's icon name, or the margins on a container. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/docs/setup.rst new/blueprint-compiler-v0.18.0/docs/setup.rst --- old/blueprint-compiler-v0.16.0/docs/setup.rst 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/docs/setup.rst 2025-07-02 04:12:35.000000000 +0200 @@ -8,7 +8,7 @@ Using the porting tool ~~~~~~~~~~~~~~~~~~~~~~ -Clone `blueprint-compiler <https://gitlab.gnome.org/jwestman/blueprint-compiler>`_ +Clone `blueprint-compiler <https://gitlab.gnome.org/GNOME/blueprint-compiler>`_ from source. You can install it using ``meson _build`` and ``ninja -C _build install``, or you can leave it uninstalled. @@ -29,7 +29,7 @@ [wrap-git] directory = blueprint-compiler - url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git + url = https://gitlab.gnome.org/GNOME/blueprint-compiler.git revision = main depth = 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/meson.build new/blueprint-compiler-v0.18.0/meson.build --- old/blueprint-compiler-v0.16.0/meson.build 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/meson.build 2025-07-02 04:12:35.000000000 +0200 @@ -1,5 +1,5 @@ project('blueprint-compiler', - version: '0.16.0', + version: '0.18.0', ) prefix = get_option('prefix') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/sample_errors/inline_menu.blp new/blueprint-compiler-v0.18.0/tests/sample_errors/inline_menu.blp --- old/blueprint-compiler-v0.16.0/tests/sample_errors/inline_menu.blp 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/sample_errors/inline_menu.blp 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -using Gtk 4.0; - -MenuButton { - menu-model: menu primary_menu {}; -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/sample_errors/inline_menu.err new/blueprint-compiler-v0.18.0/tests/sample_errors/inline_menu.err --- old/blueprint-compiler-v0.16.0/tests/sample_errors/inline_menu.err 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/sample_errors/inline_menu.err 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -4,15,4,Namespace Gtk does not contain a type called menu \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/sample_errors/menu_no_id.blp new/blueprint-compiler-v0.18.0/tests/sample_errors/menu_no_id.blp --- old/blueprint-compiler-v0.16.0/tests/sample_errors/menu_no_id.blp 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/sample_errors/menu_no_id.blp 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -using Gtk 4.0; - -menu {} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/sample_errors/menu_no_id.err new/blueprint-compiler-v0.18.0/tests/sample_errors/menu_no_id.err --- old/blueprint-compiler-v0.16.0/tests/sample_errors/menu_no_id.err 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/sample_errors/menu_no_id.err 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -3,1,4,Menu requires an ID \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/flags.ui new/blueprint-compiler-v0.18.0/tests/samples/flags.ui --- old/blueprint-compiler-v0.16.0/tests/samples/flags.ui 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/flags.ui 2025-07-02 04:12:35.000000000 +0200 @@ -7,7 +7,7 @@ <interface> <requires lib="gtk" version="4.0"/> <object class="GApplication"> - <property name="flags">1|4</property> + <property name="flags">is-service|handles-open</property> </object> <object class="GtkEventControllerScroll"> <property name="flags">1</property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/inline_menu.blp new/blueprint-compiler-v0.18.0/tests/samples/inline_menu.blp --- old/blueprint-compiler-v0.16.0/tests/samples/inline_menu.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/inline_menu.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,5 @@ +using Gtk 4.0; + +MenuButton { + menu-model: menu primary_menu {}; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/inline_menu.ui new/blueprint-compiler-v0.18.0/tests/samples/inline_menu.ui --- old/blueprint-compiler-v0.16.0/tests/samples/inline_menu.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/inline_menu.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT EDIT! +This file was @generated by blueprint-compiler. Instead, edit the +corresponding .blp file and regenerate this file with blueprint-compiler. +--> +<interface> + <requires lib="gtk" version="4.0"/> + <object class="GtkMenuButton"> + <property name="menu-model"> + <menu id="primary_menu"></menu> + </property> + </object> +</interface> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/issue_187.ui new/blueprint-compiler-v0.18.0/tests/samples/issue_187.ui --- old/blueprint-compiler-v0.16.0/tests/samples/issue_187.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/issue_187.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk" version="4.0"/> + <template class="GtkListItem"> + <property name="child"> + <object class="GtkLabel"> + <binding name="label"> + <lookup type="RecentObject" name="filename"> + <lookup name="item">GtkListItem</lookup> + </lookup> + </binding> + </object> + </property> + </template> +</interface> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/issue_187_dec.blp new/blueprint-compiler-v0.18.0/tests/samples/issue_187_dec.blp --- old/blueprint-compiler-v0.16.0/tests/samples/issue_187_dec.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/issue_187_dec.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,7 @@ +using Gtk 4.0; + +template ListItem { + child: Label { + label: bind template.item as <$RecentObject>.filename; + }; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/issue_195.blp new/blueprint-compiler-v0.18.0/tests/samples/issue_195.blp --- old/blueprint-compiler-v0.16.0/tests/samples/issue_195.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/issue_195.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,11 @@ +using Gtk 4.0; +using Adw 1; + +Adw.AlertDialog dialog1 { + responses [ + ok: "Ok", + cancel: "Cancel", + ] +} + +Button cancel {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/issue_195.ui new/blueprint-compiler-v0.18.0/tests/samples/issue_195.ui --- old/blueprint-compiler-v0.16.0/tests/samples/issue_195.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/issue_195.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT EDIT! +This file was @generated by blueprint-compiler. Instead, edit the +corresponding .blp file and regenerate this file with blueprint-compiler. +--> +<interface> + <requires lib="gtk" version="4.0"/> + <object class="AdwAlertDialog" id="dialog1"> + <responses> + <response id="ok">Ok</response> + <response id="cancel">Cancel</response> + </responses> + </object> + <object class="GtkButton" id="cancel"></object> +</interface> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested.blp new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested.blp --- old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,17 @@ +using Gtk 4.0; + +Gtk.ListView { + factory: Gtk.BuilderListItemFactory list_item_factory { + template ListItem { + child: Gtk.ListView { + factory: Gtk.BuilderListItemFactory list_item_factory { + template ListItem { + child: Gtk.Label { + label: bind template.item as <$MyObject>.name; + }; + } + }; + }; + } + }; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested.ui new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested.ui --- old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT EDIT! +This file was @generated by blueprint-compiler. Instead, edit the +corresponding .blp file and regenerate this file with blueprint-compiler. +--> +<interface> + <requires lib="gtk" version="4.0"/> + <object class="GtkListView"> + <property name="factory"> + <object class="GtkBuilderListItemFactory" id="list_item_factory"> + <property name="bytes"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> +<interface> + <template class="GtkListItem"> + <property name="child"> + <object class="GtkListView"> + <property name="factory"> + <object class="GtkBuilderListItemFactory" id="list_item_factory"> + <property name="bytes"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> +<interface> + <template class="GtkListItem"> + <property name="child"> + <object class="GtkLabel"> + <binding name="label"> + <lookup name="name" type="MyObject"> + <lookup name="item" type="GtkListItem"> + <constant>GtkListItem</constant> + </lookup> + </lookup> + </binding> + </object> + </property> + </template> +</interface>]]]]><![CDATA[></property> + </object> + </property> + </object> + </property> + </template> +</interface>]]></property> + </object> + </property> + </object> +</interface> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested_dec.blp new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested_dec.blp --- old/blueprint-compiler-v0.16.0/tests/samples/list_factory_nested_dec.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/list_factory_nested_dec.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,18 @@ +using Gtk 4.0; + +ListView { + factory: BuilderListItemFactory list_item_factory { + template ListItem { + child: ListView { + factory: BuilderListItemFactory list_item_factory { + template ListItem { + child: Label { + label: bind template.item as <$MyObject>.name; + }; + } + }; + }; + } + }; +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/menu_no_id.blp new/blueprint-compiler-v0.18.0/tests/samples/menu_no_id.blp --- old/blueprint-compiler-v0.16.0/tests/samples/menu_no_id.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/menu_no_id.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,3 @@ +using Gtk 4.0; + +menu {} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/menu_no_id.ui new/blueprint-compiler-v0.18.0/tests/samples/menu_no_id.ui --- old/blueprint-compiler-v0.16.0/tests/samples/menu_no_id.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/menu_no_id.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT EDIT! +This file was @generated by blueprint-compiler. Instead, edit the +corresponding .blp file and regenerate this file with blueprint-compiler. +--> +<interface> + <requires lib="gtk" version="4.0"/> + <menu></menu> +</interface> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/signal_template_object.blp new/blueprint-compiler-v0.18.0/tests/samples/signal_template_object.blp --- old/blueprint-compiler-v0.16.0/tests/samples/signal_template_object.blp 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/signal_template_object.blp 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,7 @@ +using Gtk 4.0; + +template $MyTemplate { + Button { + clicked => $my_signal_handler(template); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/samples/signal_template_object.ui new/blueprint-compiler-v0.18.0/tests/samples/signal_template_object.ui --- old/blueprint-compiler-v0.16.0/tests/samples/signal_template_object.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/samples/signal_template_object.ui 2025-07-02 04:12:35.000000000 +0200 @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT EDIT! +This file was @generated by blueprint-compiler. Instead, edit the +corresponding .blp file and regenerate this file with blueprint-compiler. +--> +<interface> + <requires lib="gtk" version="4.0"/> + <template class="MyTemplate"> + <child> + <object class="GtkButton"> + <signal name="clicked" handler="my_signal_handler" object="MyTemplate"/> + </object> + </child> + </template> +</interface> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/test_samples.py new/blueprint-compiler-v0.18.0/tests/test_samples.py --- old/blueprint-compiler-v0.16.0/tests/test_samples.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/test_samples.py 2025-07-02 04:12:35.000000000 +0200 @@ -181,11 +181,7 @@ def test_samples(self): # list the samples directory - samples = [ - f.stem - for f in Path(__file__).parent.glob("samples/*.blp") - if not f.stem.endswith("_dec") - ] + samples = [f.stem for f in Path(__file__).parent.glob("samples/*.blp")] samples.sort() for sample in samples: REQUIRE_ADW_1_4 = ["adw_breakpoint"] @@ -202,6 +198,7 @@ "parseable", "signal", "signal_not_swapped", + "signal_template_object", "template", "template_binding", "template_binding_extern", @@ -215,7 +212,7 @@ ] # Decompiler-only tests - SKIP_COMPILE = ["issue_177", "translator_comments"] + SKIP_COMPILE = ["issue_177", "issue_187", "translator_comments"] SKIP_DECOMPILE = [ # Comments are not preserved in either direction @@ -228,7 +225,7 @@ continue with self.subTest(sample): - if sample not in SKIP_COMPILE: + if sample not in SKIP_COMPILE and not sample.endswith("_dec"): self.assert_sample(sample, skip_run=sample in SKIP_RUN) with self.subTest("decompile/" + sample): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blueprint-compiler-v0.16.0/tests/test_tokenizer.py new/blueprint-compiler-v0.18.0/tests/test_tokenizer.py --- old/blueprint-compiler-v0.16.0/tests/test_tokenizer.py 2025-01-18 00:04:52.000000000 +0100 +++ new/blueprint-compiler-v0.18.0/tests/test_tokenizer.py 2025-07-02 04:12:35.000000000 +0200 @@ -25,7 +25,7 @@ class TestTokenizer(unittest.TestCase): - def assert_tokenize(self, string: str, expect: [Token]): + def assert_tokenize(self, string: str, expect: list[Token]): try: tokens = tokenize(string) self.assertEqual(len(tokens), len(expect))