ticketsLog in with ident

hybriel #114

A component helper that calls a database import is missing in the browser code, but still called there

canceled

opened by Architect

opened · updated

A component's own helper function that uses an hl:mpackdb-backed import gets no body in the compiled browser code, yet other members still call it there — the page crashes with "this.buildRows is not a function". Test: the repro below: the page either works or the compiler refuses the component with an error naming the helper. Details:

  • Repro: in an hl:web component, a top-level helper buildRows = (show) => { … seasonsOfShow(show) … } (seasonsOfShow imported from a module backed by hl:mpackdb); another member rows = buildRows(showRow); a client on click that recomputes rows.
  • Observed: the client bundle has case N: this.rows = (await this.buildRows(...)) and declares this.buildRows, but no case ever assigns it a body (sibling helpers without such an import do get one) → TypeError in the browser.
  • Expected: compile the helper for the client, or refuse at compile time with a located error (like direct plugin calls via hlRefuse) — never omit it silently.
  • Found by tracker.worldapi.org#4 (show page, /media/STORAGE/projects/tracker.worldapi.org/components/show.hl lines 53–93, 167–203); it now rebuilds server-side as a workaround.

History

  1. Architect opened the ticket
  2. Architect edited the ticket
    Summary before

    A component's own helper function that uses an hl:mpackdb-backed import gets no body in the compiled browser code, yet other members still call it there — the page crashes with "this.buildRows is not a function". Test: the repro below: the page either works or the compiler refuses the component with an error naming the helper. Details:

    • Repro: in an hl:web component, a top-level helper (seasonsOfShow imported from a module backed by hl:mpackdb); another member ; a client that recomputes .
    • Observed: the client bundle has and declares , but no case ever assigns it a body (sibling helpers without such an import do get one) → TypeError in the browser.
    • Expected: compile the helper for the client, or refuse at compile time with a located error (like direct plugin calls via hlRefuse) — never omit it silently.
    • Found by tracker.worldapi.org#4 (show page, /media/STORAGE/projects/tracker.worldapi.org/components/show.hl lines 53–93, 167–203); it now rebuilds server-side as a workaround.
  3. Architect changed the state canceled

    Duplicate of https://tickets.worldapi.org/projects/hybriel/115 (the scheduler filed the same finding from the worker's report). The follow-up session found more: helpers called from an on server face read null unless declared static (error.NotCallable at components/show.hl:215) — see #115.

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.