Skip to content

add LVGL app to XML conveter - #426

Open
kisvegabor wants to merge 10 commits into
masterfrom
lvgl_c2pro_xml
Open

add LVGL app to XML conveter#426
kisvegabor wants to merge 10 commits into
masterfrom
lvgl_c2pro_xml

Conversation

@kisvegabor

Copy link
Copy Markdown
Member

No description provided.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

15 issues found across 209 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/debugger.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/debugger.py:30">
P2: The `eclipse` choice is advertised as supported, but selecting it only prints a message and starts no debugger. Remove this choice until the integration exists, or implement `connect_to_eclipse()`.</violation>
</file>

<file name="lvgl_widgets_xml/v9.5.0/globals.xml">

<violation number="1" location="lvgl_widgets_xml/v9.5.0/globals.xml:70">
P1: LVGL 9.5 event values 40, 66, 68, and 69 remain unmapped, so converting callbacks or properties using those events loses their event names. Add the missing LVGL 9.5 event members rather than leaving gaps in the numeric enum map.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/misc/lv_style.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/misc/lv_style.py:62">
P2: When a style coordinate uses LVGL's `LV_COORD_TYPE_PX_NEG` encoding, this branch returns the encoded integer instead of the negative pixel value. Decode the negative-pixel tag before treating the value as a plain coordinate, matching `lv_utils.format_coord`.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/dashboard/data_collector.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/dashboard/data_collector.py:232">
P2: The dashboard never loads widget specs because this path points into a nonexistent `scripts` directory. Resolve the shipped file under `generators/generators` so widget fields and summaries render.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/core/lv_obj.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/core/lv_obj.py:155">
P2: When one child pointer is unreadable, `read_value()` returns `CorruptedValue`, but `LVObject(...)` raises before the child reaches `Snapshot.fallback`; `safe_collect` then loses every later sibling. Yield the corrupted sentinel for the fallback path and wrap only valid values.</violation>
</file>

<file name="tools/lvgl_app2pro/src/lvgl_app2pro/mapping.py">

<violation number="1" location="tools/lvgl_app2pro/src/lvgl_app2pro/mapping.py:18">
P1: When an app sets one of the omitted LVGL style properties, `style_prop_to_xml()` rejects it and the converter loses that visual setting instead of preserving it. Add every property accepted by `lv_xml_style_prop_to_enum()` to this allowlist, or derive the list from that source.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/core/lv_obj.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/core/lv_obj.py:64">
P1: The no-root `dump obj` invocation fails before dumping the first screen because `hex()` cannot convert these wrappers directly. Convert both `disp` and `screen` with `int()` before passing them to `hex()`.</violation>
</file>

<file name="tools/lvgl_app2pro/src/lvgl_app2pro/values.py">

<violation number="1" location="tools/lvgl_app2pro/src/lvgl_app2pro/values.py:265">
P1: With the shipped schemas, `lv_animimg.src` and `lv_line.points` are valid array properties that this converter drops as unsupported. Add conversions for the declared array types, or preserve them through an explicit unresolved-value report instead of silently emitting incomplete widgets.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/core/lv_global.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/core/lv_global.py:125">
P1: When NuttX calls `ensure_init(inst)` for the single-instance `lv_global` symbol, this branch casts the struct value instead of normalizing its address. Use `Value.normalize` for all explicit inputs so both struct values and pointers become `lv_global_t *`.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_widget_wrappers.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_widget_wrappers.py:28">
P1: Running the documented generator from this checkout discovers no LVGL headers, reports zero widgets, and marks the existing specs as removed. Resolve the LVGL root from an explicit checkout/configuration and fail before writing outputs when its headers are absent.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_draw_consts.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_draw_consts.py:15">
P2: When this generator runs against the documented LVGL v9.5 checkout, `DRAW_H` points to a nonexistent header and generation stops before producing the constants file. Point `DRAW_H` at `LVGL_SRC / "draw" / "lv_draw.h"`.</violation>
</file>

<file name="tools/lvgl_app2pro/src/lvgl_app2pro/emit.py">

<violation number="1" location="tools/lvgl_app2pro/src/lvgl_app2pro/emit.py:182">
P1: Generated `globals.xml` puts `<styles>` before `<fonts>`, but the LVGL Pro globals validator requires styles after fonts. Move the styles block below `<fonts>` so generated projects validate.

(Based on your team's feedback about globals.xml ordering.) .</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/misc/lv_cache.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/misc/lv_cache.py:16">
P2: When users invoke `check cache` without a cache name, argparse exits before the sanity check because this positional argument is still required. Make the positional argument optional so `default="image"` takes effect.</violation>
</file>

<file name="tools/lvgl_app2pro/tests/reference_xml_projects/lv_demo_widgets/screens/screen_1.xml">

<violation number="1" location="tools/lvgl_app2pro/tests/reference_xml_projects/lv_demo_widgets/screens/screen_1.xml:103">
P2: The "Team player" and "Hard-working" switches are swapped relative to their labels and to the original demo. The XML places the "Team player" label in grid column 1 but its switch in column 0, and "Hard-working" label in column 0 but its switch in column 1. In the LVGL demo each switch sits in the same grid column as its label (sw1/Team player at column 1, sw2/Hard-working at column 0). Swap the two `lv_switch` grid cell column positions so each switch aligns under its label.</violation>
</file>

<file name="lvgl_widgets_xml/v9.5.0/lv_obj.xml">

<violation number="1" location="lvgl_widgets_xml/v9.5.0/lv_obj.xml:259">
P2: These newly declared style attributes are dropped by `lvgl_app2pro` because its XML-property whitelist omits their runtime names. Add all six names to the converter/XML-engine mapping before advertising them in this schema.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/misc/lv_array.py
lines = ["<screen>"]
own = book.screen_names(screen.name)
if own:
lines.append(f"{INDENT}<styles>")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Generated globals.xml puts <styles> before <fonts>, but the LVGL Pro globals validator requires styles after fonts. Move the styles block below <fonts> so generated projects validate.

(Based on your team's feedback about globals.xml ordering.) .

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/lvgl_app2pro/emit.py, line 182:

<comment>Generated `globals.xml` puts `<styles>` before `<fonts>`, but the LVGL Pro globals validator requires styles after fonts. Move the styles block below `<fonts>` so generated projects validate.

(Based on your team's feedback about globals.xml ordering.) .</comment>

<file context>
@@ -0,0 +1,283 @@
+    lines = ["<screen>"]
+    own = book.screen_names(screen.name)
+    if own:
+        lines.append(f"{INDENT}<styles>")
+        lines.extend(render_style_defs(own, book, report, 2))
+        lines.append(f"{INDENT}</styles>")
</file context>

Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/core/lv_obj_class.py
Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/schema.py
def invoke(self, args, from_tty):
parser = argparse.ArgumentParser(description="Dump lvgl cache info.")
parser.add_argument(
"cache",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When users invoke check cache without a cache name, argparse exits before the sanity check because this positional argument is still required. Make the positional argument optional so default="image" takes effect.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/misc/lv_cache.py, line 16:

<comment>When users invoke `check cache` without a cache name, argparse exits before the sanity check because this positional argument is still required. Make the positional argument optional so `default="image"` takes effect.</comment>

<file context>
@@ -0,0 +1,112 @@
+    def invoke(self, args, from_tty):
+        parser = argparse.ArgumentParser(description="Dump lvgl cache info.")
+        parser.add_argument(
+            "cache",
+            type=str,
+            choices=["image", "image_header"],
</file context>

Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/core/lv_obj_class.py
Comment thread tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_obj_state_consts.py Outdated
Comment thread tools/lvgl_app2pro/src/gdb_plugin/generators/generators/gen_style_consts.py Outdated
Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/widgets/lv_label.py

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/lvgl_app2pro/src/lvgl_app2pro/driver.py">

<violation number="1" location="tools/lvgl_app2pro/src/lvgl_app2pro/driver.py:76">
P2: When the app needs libraries found only through `LD_LIBRARY_PATH`, this sanitization removes the path before GDB runs the inferior, so conversion fails before dumping. Sanitize GDB startup separately, then restore the original path for the inferior before `run`.</violation>
</file>

<file name="docs/migration/from-c-code.mdx">

<violation number="1" location="docs/migration/from-c-code.mdx:172">
P3: The claim that "Only LVGL v9.5 is supported" is inaccurate. The tool ships widget schemas for both `v9.4.0` and `v9.5.0` (`lvgl_widgets_xml/`), and `schema.py#find_schema_dir` picks an exact match for the app's detected version and falls back to the newest available set for anything newer. This also contradicts this same page's "How does it work" point 4, which says the version is read from the binary to pick the matching schemas. List the actually supported versions (or say schemas ship for v9.4 and v9.5, with newer apps converting against the newest set) so users with a v9.4 app are not misled.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

if not app.exists():
raise DumpError(f"{app} does not exist")

env = _clean_env()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When the app needs libraries found only through LD_LIBRARY_PATH, this sanitization removes the path before GDB runs the inferior, so conversion fails before dumping. Sanitize GDB startup separately, then restore the original path for the inferior before run.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/lvgl_app2pro/driver.py, line 76:

<comment>When the app needs libraries found only through `LD_LIBRARY_PATH`, this sanitization removes the path before GDB runs the inferior, so conversion fails before dumping. Sanitize GDB startup separately, then restore the original path for the inferior before `run`.</comment>

<file context>
@@ -46,17 +67,18 @@ def check_gdb(gdb_binary="gdb"):
         raise DumpError(f"{app} does not exist")
 
-    env = dict(os.environ)
+    env = _clean_env()
     env["LVGL_APP2PRO_BREAK"] = stop_at
     if app_args:
</file context>


**Limitations**

- ❌ Only LVGL v9.5 is supported

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The claim that "Only LVGL v9.5 is supported" is inaccurate. The tool ships widget schemas for both v9.4.0 and v9.5.0 (lvgl_widgets_xml/), and schema.py#find_schema_dir picks an exact match for the app's detected version and falls back to the newest available set for anything newer. This also contradicts this same page's "How does it work" point 4, which says the version is read from the binary to pick the matching schemas. List the actually supported versions (or say schemas ship for v9.4 and v9.5, with newer apps converting against the newest set) so users with a v9.4 app are not misled.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/migration/from-c-code.mdx, line 172:

<comment>The claim that "Only LVGL v9.5 is supported" is inaccurate. The tool ships widget schemas for both `v9.4.0` and `v9.5.0` (`lvgl_widgets_xml/`), and `schema.py#find_schema_dir` picks an exact match for the app's detected version and falls back to the newest available set for anything newer. This also contradicts this same page's "How does it work" point 4, which says the version is read from the binary to pick the matching schemas. List the actually supported versions (or say schemas ship for v9.4 and v9.5, with newer apps converting against the newest set) so users with a v9.4 app are not misled.</comment>

<file context>
@@ -108,98 +144,109 @@ Abbreviated, the widgets demo converts to this:
+
+**Limitations**
+
+- ❌ Only LVGL v9.5 is supported
+- ❌ No [components](../syntax/components) are created. Each screen contains all
+  its widgets in one screen XML file.
</file context>
Suggested change
- ❌ Only LVGL v9.5 is supported
- ❌ Only LVGL v9.4 and v9.5 are supported (newer apps convert against the newest shipped schemas)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 15 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/lvgl_app2pro/src/lvgl_app2pro/emit.py">

<violation number="1" location="tools/lvgl_app2pro/src/lvgl_app2pro/emit.py:87">
P3: Scale-section style values bypass constant collection because they live under `section["styles"]`, not `node.slots`. Include section styles in the constant collection/application traversal so emitted section styles follow the documented const behavior and reuse existing color and number constants.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/values.py Outdated
# A scale section's styles have no attribute form, so they are
# always named. Registering them here keeps one style definition
# even when several sections share it.
for section in node.sections:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Scale-section style values bypass constant collection because they live under section["styles"], not node.slots. Include section styles in the constant collection/application traversal so emitted section styles follow the documented const behavior and reuse existing color and number constants.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/lvgl_app2pro/emit.py, line 87:

<comment>Scale-section style values bypass constant collection because they live under `section["styles"]`, not `node.slots`. Include section styles in the constant collection/application traversal so emitted section styles follow the documented const behavior and reuse existing color and number constants.</comment>

<file context>
@@ -81,6 +81,14 @@ def plan_styles(screens):
+            # A scale section's styles have no attribute form, so they are
+            # always named. Registering them here keeps one style definition
+            # even when several sections share it.
+            for section in node.sections:
+                section["names"] = {
+                    key: book.register(slot, screen.name)
</file context>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 32 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/lvgl_app2pro/tests/test.py">

<violation number="1" location="tools/lvgl_app2pro/tests/test.py:124">
P3: The filter hides only lines containing `.gnu_debugaltlink`, but GDB reports missing debug info for system libraries as "no debugging symbols found in ...", "Could not find separate debuginfos" or similar — none of which contain that string. `.gnu_debugaltlink` appears only when the app's own DWARF uses an alt-link section. So the GDB system-library complaints the comment says should be hidden are still printed, which is exactly the noise that made the earlier broken version probe go unnoticed. Broaden the predicate to also skip GDB's missing-debug-info messages (e.g. a regex matching `no debugging symbols|separate debuginfos|no debug info available`) or derive the set of GDB-only stderr lines empirically from a successful run.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/draw/lv_draw_buf.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/draw/lv_draw_buf.py:115">
P3: `_convert_to_image` is only reached through `_read_image`, which already calls `_require_imaging()` at its entry, so the additional `_require_imaging()` added inside `_convert_to_image` is a guaranteed no-op. Drop it (or keep only the one in `_convert_to_image` and remove it from `_read_image`) to avoid duplicate work in the hot image-conversion path.</violation>
</file>

<file name="tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py:15">
P2: When `LVGL_ROOT` is a headers-only installation, `_is_lvgl` rejects it before `include_dir` can use `include/lvgl`, so header generators exit instead of regenerating tables. Accept the installed layout in validation and make source-dependent generators report their separate `src` requirement.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/emit.py Outdated


def _is_lvgl(path):
return (path / "lv_version.h").is_file() and (path / "src").is_dir()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When LVGL_ROOT is a headers-only installation, _is_lvgl rejects it before include_dir can use include/lvgl, so header generators exit instead of regenerating tables. Accept the installed layout in validation and make source-dependent generators report their separate src requirement.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py, line 15:

<comment>When `LVGL_ROOT` is a headers-only installation, `_is_lvgl` rejects it before `include_dir` can use `include/lvgl`, so header generators exit instead of regenerating tables. Accept the installed layout in validation and make source-dependent generators report their separate `src` requirement.</comment>

<file context>
@@ -0,0 +1,42 @@
+
+
+def _is_lvgl(path):
+    return (path / "lv_version.h").is_file() and (path / "src").is_dir()
+
+
</file context>

Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/misc/lv_cache_iter_factory.py Outdated
Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/cli.py Outdated
Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/cmds/misc/lv_version.py Outdated
Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/cli.py Outdated
# on success is how a broken version probe went unnoticed. GDB's own
# complaints about system libraries it has no debug info for are not that.
for line in done.stderr.splitlines():
if line.strip() and ".gnu_debugaltlink" not in line:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The filter hides only lines containing .gnu_debugaltlink, but GDB reports missing debug info for system libraries as "no debugging symbols found in ...", "Could not find separate debuginfos" or similar — none of which contain that string. .gnu_debugaltlink appears only when the app's own DWARF uses an alt-link section. So the GDB system-library complaints the comment says should be hidden are still printed, which is exactly the noise that made the earlier broken version probe go unnoticed. Broaden the predicate to also skip GDB's missing-debug-info messages (e.g. a regex matching no debugging symbols|separate debuginfos|no debug info available) or derive the set of GDB-only stderr lines empirically from a successful run.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/tests/test.py, line 124:

<comment>The filter hides only lines containing `.gnu_debugaltlink`, but GDB reports missing debug info for system libraries as "no debugging symbols found in ...", "Could not find separate debuginfos" or similar — none of which contain that string. `.gnu_debugaltlink` appears only when the app's own DWARF uses an alt-link section. So the GDB system-library complaints the comment says should be hidden are still printed, which is exactly the noise that made the earlier broken version probe go unnoticed. Broaden the predicate to also skip GDB's missing-debug-info messages (e.g. a regex matching `no debugging symbols|separate debuginfos|no debug info available`) or derive the set of GDB-only stderr lines empirically from a successful run.</comment>

<file context>
@@ -117,6 +117,12 @@ def run(command, **kwargs):
+    # on success is how a broken version probe went unnoticed. GDB's own
+    # complaints about system libraries it has no debug info for are not that.
+    for line in done.stderr.splitlines():
+        if line.strip() and ".gnu_debugaltlink" not in line:
+            print(f"  {line}")
     return done.stdout
</file context>

Returns:
PIL.Image or None on failure.
"""
_require_imaging()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: _convert_to_image is only reached through _read_image, which already calls _require_imaging() at its entry, so the additional _require_imaging() added inside _convert_to_image is a guaranteed no-op. Drop it (or keep only the one in _convert_to_image and remove it from _read_image) to avoid duplicate work in the hot image-conversion path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/draw/lv_draw_buf.py, line 115:

<comment>`_convert_to_image` is only reached through `_read_image`, which already calls `_require_imaging()` at its entry, so the additional `_require_imaging()` added inside `_convert_to_image` is a guaranteed no-op. Drop it (or keep only the one in `_convert_to_image` and remove it from `_read_image`) to avoid duplicate work in the hot image-conversion path.</comment>

<file context>
@@ -84,13 +112,20 @@ def _read_image(self, strict: bool = False) -> Optional[Image.Image]:
         Returns:
             PIL.Image or None on failure.
         """
+        _require_imaging()
         header = self.super_value("header")
         stride = int(header["stride"])
</file context>

Comment thread tools/lvgl_app2pro/src/gdb_plugin/lvglgdb/lvgl/misc/lv_cache_iter_factory.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 existing issue remains and no new issues found across 12 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread tools/lvgl_app2pro/src/lvgl_app2pro/cli.py
@mrhubbs

mrhubbs commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

It doesn't look great to me that we duplicate the widget XML schemas in this repo, for this feature.

I also note every built-in widget gets a Python schema.... those should just be made from the XML schemas to avoid massive duplication.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py">

<violation number="1" location="tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py:20">
P2: `_is_lvgl` now treats any directory containing only a copied `include/lvgl/lv_version.h` (no top-level `lv_version.h`, no `src/`) as an LVGL root. Because `lvgl_root` walks all ancestors, a stray or partial copy of that single header anywhere up the tree silently redirects the generators to that directory, and `include_dir` returns its `include/lvgl`. A partial copy yields missing headers (`core/lv_event.h` etc.), producing wrong or empty tables — the failure this module exists to avoid. Consider requiring the installed tree to look like a real install (e.g. also check for a few representative public headers) rather than matching on one file.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

return (path / "src").is_dir() or (path / "include" / "lvgl").is_dir()
# An installed tree has no top-level lv_version.h, only the copy that was
# installed with the rest of the public headers.
return (path / "include" / "lvgl" / "lv_version.h").is_file()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: _is_lvgl now treats any directory containing only a copied include/lvgl/lv_version.h (no top-level lv_version.h, no src/) as an LVGL root. Because lvgl_root walks all ancestors, a stray or partial copy of that single header anywhere up the tree silently redirects the generators to that directory, and include_dir returns its include/lvgl. A partial copy yields missing headers (core/lv_event.h etc.), producing wrong or empty tables — the failure this module exists to avoid. Consider requiring the installed tree to look like a real install (e.g. also check for a few representative public headers) rather than matching on one file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/lvgl_app2pro/src/gdb_plugin/generators/lvgl_paths.py, line 20:

<comment>`_is_lvgl` now treats any directory containing only a copied `include/lvgl/lv_version.h` (no top-level `lv_version.h`, no `src/`) as an LVGL root. Because `lvgl_root` walks all ancestors, a stray or partial copy of that single header anywhere up the tree silently redirects the generators to that directory, and `include_dir` returns its `include/lvgl`. A partial copy yields missing headers (`core/lv_event.h` etc.), producing wrong or empty tables — the failure this module exists to avoid. Consider requiring the installed tree to look like a real install (e.g. also check for a few representative public headers) rather than matching on one file.</comment>

<file context>
@@ -13,9 +13,11 @@
+        return (path / "src").is_dir() or (path / "include" / "lvgl").is_dir()
+    # An installed tree has no top-level lv_version.h, only the copy that was
+    # installed with the rest of the public headers.
+    return (path / "include" / "lvgl" / "lv_version.h").is_file()
 
 
</file context>

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