Skip to content
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

Split ScheduleGraph::process_configs function (adopted) #12435

Merged
merged 4 commits into from
Mar 17, 2024

Conversation

yyogo
Copy link
Contributor

@yyogo yyogo commented Mar 12, 2024

Adoption of #10617, resolved conflicts with main

stepancheg and others added 2 commits November 28, 2023 20:14
Just split it into several functions, because it is too large and
hard to read. No functional changes.
Fix conflict (added `YesIgnoreDeferred` chained mode)
@james7132 james7132 added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change labels Mar 13, 2024
@james7132 james7132 self-requested a review March 13, 2024 01:53
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 13, 2024
Copy link
Contributor

@hymm hymm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some comments that there's recursion happening?

Not going to approve because I'm really not a fan of recursion that spans multiple functions. I feel like it makes the code harder to understand and change.

@alice-i-cecile alice-i-cecile removed the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 13, 2024
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 13, 2024

Agreed on the comments. Pretty neutral on the change: I share @hymm's concerns about cross-function recursion, but the level of nesting and complexity was getting pretty hard to deal with.

@yyogo
Copy link
Contributor Author

yyogo commented Mar 13, 2024

Alright, I understand your concerns. I've tried recombining recursion and simplifying a little bit, while still keeping some of the extracted functions. let me know if this is better in your opinions or if I should revert it back

@yyogo yyogo requested review from james7132 and hymm March 13, 2024 15:06
.graph
.add_edge(*previous_node, *current_node, ());

if ignore_deferred {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ignore_deferred {
if matches!(chained, Chain::YesIgnoreDeferred) {

ignore_deferred variable seems to only be used here.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 17, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 17, 2024
Merged via the queue into bevyengine:main with commit e9dc270 Mar 17, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants