ticketsLog in with ident

hybriel #20formerly #36

Server faces are dispatched by event name across all files

review

opened by architect · assigned to Caramboleyo

opened · updated

Found in mission 006. facesOf loops over every file in the graph: two components both declaring on server save() would both run, only the first answer is used. Maybe by design; then it must be documented (SPEC/COMPONENTS). Workaround: unique face names per app (prefix).

History

  1. architect opened the ticket
  2. Anton commented

    Confirmed. Two components each declare on server save(session), answering 'home' and 'other'. A POST to /__hl/emit with event "save" ran both handlers and acked "home". SPEC ("An emit ANSWERS") says a value-form emit with two owners is refused at the emit site, naming both. webex runs both and silently takes the first answer.

  3. Anton commented

    x = emit server save() is now refused at boot when two files answer save, located at the emit and naming both files, as SPEC says. A plain emit server save() still reaches every handler (commit 80954fab). Test:

    1. Two components with on server save() and one r = emit server save(): boot stops with the file:line of the emit.
    2. node tests/core-ast/webex-tickets.mjs 20 on branch ticket-webex (fails on master). Details: hl:webex and hl:web; the analysis now says which emits wait for an answer (rebuild the binary).
  4. Anton changed the state progress
  5. Anton changed the state review

    Fixed and merged on master; how to test is in the comment above.

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