Repository navigation
Give each action registration its own trigger - #528
Conversation
…ot stop its action
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c82afb530d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Problem
A registration with an action,
registerPlayerUnitEvent(p, filter, condition, action)(andregisterPlayerEvent(p, condition, action)), put its condition and action on the event's shared trigger. On that trigger every condition has to hold for the actions to run. A listener which returns nothing counts as a condition that does not hold, on Jass and on Lua. So any such listener of the same event stopped every action registered on it.LastOrderregisters exactly such a listener on point, target and immediate orders. In any map that imports it, in-game test 20 ("a condition gates the action registered with it") failed: the action never ran although its condition held. It fails onmasterin a plain build of the repository's ExampleMap, on both backends.Change
filterfunc. Its condition gates its own action and nothing else.getPlayerUnitEventTriggerstill seals, unchanged.LastOrder.Evidence
Warcraft III 3.0.1.24371, the in-game suite run automatically in a test map, before and after on each backend.
Lua:
master'sRegisterEventsfailed 1 of 144 checks:the action ran, as its condition held (0).c82afb5: the suite twice in one game, both runs judged, passed. First run 144/144, second 138/138 with 6 checks that only run once skipped. Test 20: listener 1, listener returning nothing 1, gated action 1, denied action 0.Jass (a test map holding only the in-game suite):
master'sRegisterEventsfailed 1 of 118 checks:the action ran, as its condition held (0).c82afb5: 118/118. Test 20: listener 1, listener returning nothing 1, gated action 1, denied action 0.masteralso fails only this check (116/117).Both backends catch the same 4 errors inside
try()before and after; none is uncaught.Other checks:
grill typecheck --quietpassed.grill test --quietpassed 771/771.