hybriel
Server faces are dispatched by event name across all files
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
architect opened the ticket 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.Anton commented x = emit server save()is now refused at boot when two files answersave, located at the emit and naming both files, as SPEC says. A plainemit server save()still reaches every handler (commit 80954fab). Test:- Two components with
on server save()and oner = emit server save(): boot stops with the file:line of the emit. node tests/core-ast/webex-tickets.mjs 20on 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).
- Two components with
Anton changed the state progress 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.