fix(core/traverser & loop-controller & tests): refactor loop usage,…#8
Open
hesprs wants to merge 3 commits intogorango:masterfrom
Open
fix(core/traverser & loop-controller & tests): refactor loop usage,…#8hesprs wants to merge 3 commits intogorango:masterfrom
loop usage,…#8hesprs wants to merge 3 commits intogorango:masterfrom
Conversation
… fix traverser loop handling - instead of relying on `any` join strategy for handling loop execution, now it detects all nodes inside a loop and resets all the nodes in that loop as uncompleted to re-execute the loop when a loop is about to start. This can ensure a loop with >= 3 nodes can run and make execution more stable (`any` can break in-loop logic). - use more elegant and intuitive method to define loops: set loop start and end, wire edges **inside the loop**, then wire incoming and breaking nodes directly to the loop instead of nodes inside the loop. This reduces rewiring overhead and is the similar pattern used by popular workflow products. - update tests to reflect new loop usage. - add one test that tests whether a loop with >= 3 nodes can run. - update docs to reflect new loop usage. - fix small flaws in docs. - examined `@flowcraft/compiler` logic, found its tests contains hardcoded personal file paths, thus unable to determine whether it needs updating. Examined it's code, found its `for-in` and `while` handler actually assumes the new loop usage. This is confusing since the loop was originally not used like so. Anyway it doesn't need changing (from personal view).
- remove dead code that prevents any node being the sibling of a loop controller from execution - enhance traverser loop nodes detection and improve safety
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… fix traverser loop handling
anyjoin strategy for handling loop execution, now it detects all nodes inside a loop and resets all the nodes in that loop as uncompleted to re-execute the loop when a loop is about to start. This can ensure a loop with >= 3 nodes can run and make execution more stable (anycan break in-loop logic).@flowcraft/compilerlogic, found its tests contains hardcoded personal file paths, thus unable to determine whether it needs updating. Examined it's code, found itsfor-inandwhilehandler actually assumes the new loop usage. This is confusing since the loop was originally not used like so. Anyway it doesn't need changing (from personal view).