Skip to content

Node transformers topological sort #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 30, 2019

Conversation

sanex3339
Copy link
Member

@sanex3339 sanex3339 commented Dec 30, 2019

Node transformers topological sort

Ability to define dependencies on other nodes inside the same transformation stage.
Node transformers will split into groups based on these relations.
AST traversal will traverse the AST for each group, so, this is like sub-stages.

This mechanism is required, because when some part of the AST-tree was manually added inside the transformer, estraverse won't traverse this part of the AST in the current traversal.
As a result - the next transformers inside the same transformation stage won't transform the newly added part of the AST.

TODO:

  • tests

sanex3339 added 2 commits December 30, 2019 19:46
…Keys` option

* Internal `TransformersRunner` rework to support topological sort of node transformers
@sanex3339 sanex3339 requested a review from zamotkin December 30, 2019 17:15
@sanex3339
Copy link
Member Author

TODO: tests for LevelledTopologicalSorter

@coveralls
Copy link

coveralls commented Dec 30, 2019

Coverage Status

Coverage decreased (-0.02%) to 98.0% when pulling d3bfe4c on node-transformers-topological-sort into 4a1361c on master.

@zamotkin
Copy link
Member

Cool feature, I'll could review it only a one week later, sorry.

@sanex3339 sanex3339 merged commit 34f4300 into master Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants