-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 by Bors] - expose ScheduleGraph
for third party dependencies
#7522
[Merged by Bors] - expose ScheduleGraph
for third party dependencies
#7522
Conversation
@@ -751,7 +878,13 @@ impl ScheduleGraph { | |||
Ok(base_set) | |||
} | |||
|
|||
fn build_schedule( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of making this (and SystemSchedule
) public, we could have a method
pub fn ScheduleGraph::compute_info(&mut self) -> ScheduleGraphInfo {
// compute ambiguities, base sets, cycles, ...
// caches dependency_flattened etc.
}
fn ScheduleGraph::build_schedule(&self, &Components, ScheduleGraphInfo) -> Result<SystemSchedule, _> {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that overall I like the direction here: I can imagine future use cases where manually controlling schedule builds is helpful.
19f7d37
to
c5ca453
Compare
Co-authored-by: Alice Cecile <[email protected]>
c5ca453
to
baeabd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is the right way of exposing this functionality. But I'm going to approve since it's relatively unintrusive and I think it's important that bevy_mod_debugdump works for 0.10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seconding WrongShoe's comment above, but I don't mind this approach for now.
bors r+ |
# Objective The `ScheduleGraph` should be expose so that crates like [bevy_mod_debugdump](https://github.com/jakobhellermann/bevy_mod_debugdump/blob/stageless/docs/README.md) can access useful information. ## Solution - expose `ScheduleGraph`, `NodeId`, `BaseSetMembership`, `Dag` - add accessor functions for sets and systems ## Changelog - expose `ScheduleGraph` for use in third party tools This does expose our use of `petgraph` as a graph library, so we can only change that as a breaking change.
Pull request successfully merged into main. Build succeeded:
|
ScheduleGraph
for third party dependenciesScheduleGraph
for third party dependencies
# Objective The `ScheduleGraph` should be expose so that crates like [bevy_mod_debugdump](https://github.com/jakobhellermann/bevy_mod_debugdump/blob/stageless/docs/README.md) can access useful information. ## Solution - expose `ScheduleGraph`, `NodeId`, `BaseSetMembership`, `Dag` - add accessor functions for sets and systems ## Changelog - expose `ScheduleGraph` for use in third party tools This does expose our use of `petgraph` as a graph library, so we can only change that as a breaking change.
# Objective - other tools (bevy_mod_debugdump) would like to have access to the ambiguities so that they can do their own reporting/visualization ## Solution - store `conflicting_systems` in `ScheduleGraph` after calling `build_schedule` The solution isn't very pretty and as pointed out it #7522, there may be a better way of exposing this, but this is the quick and dirty way if we want to have this functionality exposed in 0.10.
# Objective - other tools (bevy_mod_debugdump) would like to have access to the ambiguities so that they can do their own reporting/visualization ## Solution - store `conflicting_systems` in `ScheduleGraph` after calling `build_schedule` The solution isn't very pretty and as pointed out it bevyengine#7522, there may be a better way of exposing this, but this is the quick and dirty way if we want to have this functionality exposed in 0.10.
Objective
The
ScheduleGraph
should be expose so that crates like bevy_mod_debugdump can access useful information.Solution
ScheduleGraph
,NodeId
,BaseSetMembership
,Dag
Changelog
ScheduleGraph
for use in third party toolsThis does expose our use of
petgraph
as a graph library, so we can only change that as a breaking change.