Expose system accesses and filters in BRP schedule.graph#24743
Expose system accesses and filters in BRP schedule.graph#24743Zeophlite wants to merge 16 commits into
schedule.graph#24743Conversation
dd9ee4d to
5c8f7ba
Compare
5c8f7ba to
93df812
Compare
b2514a1 to
9c380e2
Compare
|
Note: docs copied from underlying objects, may reduce them later |
|
You added a new feature but didn't add a description for it. Please update the root Cargo.toml file. |
|
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
alice-i-cecile
left a comment
There was a problem hiding this comment.
LGTM once there's a migration guide :)
|
Needs a second approval still :) |
chescock
left a comment
There was a problem hiding this comment.
This seems like valuable data to expose! I'm still skeptical about exposing reads_inverted and writes_inverted in this way, but I'm willing to approve anyway if others argue that it's the right approach.
| pub struct AccessData { | ||
| /// All accessed components, or forbidden components if | ||
| /// `Self::read_and_writes_inverted` is set. | ||
| pub read_and_writes: Vec<u32>, |
There was a problem hiding this comment.
I'll note again that exposing a list that is either one thing or its opposite is very confusing. I'm not familiar with the BRP conventions for serializing enums, though. Would it work serialize this as separate inclusion and exclusion lists? Something like
/// If `false`, this reads all components in `reads_included`.
/// If `true`, this reads all components *except* those in `reads_excluded`.
pub reads_unbounded: bool,
/// These components are *always* read,
/// but if `reads_unbounded` then this is empty and not exhaustive.
pub reads_included: Vec<u32>,
/// These components are *never* read,
/// but if `!reads_unbounded` then this is empty and not exhaustive.
pub reads_excluded: Vec<u32>,would be a little harder to misinterpret.
64eaa4e to
2c13ca6
Compare
Objective
ScheduleDatainbevy_dev_tools, and correspondinglyschedule.graphin BRP, give only components related to system conflicts, not to accesses and filters, or required components - this is needed for schedule visualisationSolution
ScheduleDataTesting
cargo run --example server --features="bevy_remote"in terminal 1curl -d'{"jsonrpc":"2.0","method":"schedule.graph","id":1,"params":{"schedule_label":"Update"}}' -X POST -H "Accept: applcation/json" -H "Content-Type: application/json" http://127.0.0.1:15702 > update3.jsonin terminal 2 (see migration guide)