bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Add bevy_dev_tools crate

Open matiqo15 opened this issue 1 year ago • 5 comments

Objective

  • Resolves #11309

Solution

  • Add bevy_dev_tools crate as a default feature.
  • Add DevToolsPlugin and add it to an app if the bevy_dev_tools feature is enabled.

bevy_dev_tools is reserved by @alice-i-cecile, should we wait until it gets transferred to cart before merging?

matiqo15 avatar Jan 14 '24 15:01 matiqo15

Added the A-Editor label: I'm going to group the dev-tools and editor PRs and issues together for triage until that proves to be a bad idea.

I'm going to wait on @cart's sign-off before merging this, but I think we're starting to get a clearer vision of what this crate might look like and can unblock editor-adjacent work now.

alice-i-cecile avatar Jan 14 '24 15:01 alice-i-cecile

should we wait until it gets transferred to cart before merging?

Not necessarily, but I think we should have something in those tools before merging. You could try moving https://github.com/bevyengine/bevy/blob/main/crates/bevy_app/src/ci_testing.rs

mockersf avatar Jan 14 '24 21:01 mockersf

I'm fine to move that into here as part of the initial PR. There's a number of other things I want to move and add, but this is a good uncontroversial first option.

alice-i-cecile avatar Jan 14 '24 21:01 alice-i-cecile

Probably, we also want an option to enable only some tools

1st solution

We remove bevy_dev_tools from default features and lock every tool under a new feature - this is a simple solution but could grow out of control over time.

2nd solution

We create a resource to store information about dev tools (see DiagnosticsStore). There are a few reasons why I think this is better:

  • Easier for users to add their own tools
  • We could mark it as an editor/non-editor tool
  • Show every enabled tool in the editor
  • Possibly in the future, add/remove tool at runtime

I believe this could be done in a follow-up PR, to make it easier for review.

matiqo15 avatar Jan 15 '24 21:01 matiqo15

Yep, IMO we add a few tools first, then start thinking about how to abstract them. I'd prefer to have it runtime configured too.

alice-i-cecile avatar Jan 15 '24 23:01 alice-i-cecile

Just left some thoughts in this thread: https://github.com/bevyengine/bevy/pull/11341/files#r1459692523

cart avatar Jan 19 '24 20:01 cart

#12305 is a feature that fits the best in bevy_dev_tools. What needs to be done for this PR to be merged, to unblock the simplified backtraces one?

BD103 avatar Mar 05 '24 12:03 BD103

https://github.com/bevyengine/bevy/pull/12305 is a feature that fits the best in bevy_dev_tools. What needs to be done for this PR to be merged, to unblock the simplified backtraces one?

So, IMO:

  1. Resolve merge conflicts.
  2. Bump to 0.14.0-dev.
  3. Add a tool or two.
  4. Get the final sign-off from @cart.

If there's no movement on this PR in the next week or so I'll adopt it and get it through :)

alice-i-cecile avatar Mar 05 '24 19:03 alice-i-cecile

If we want more tools here, maybe we can move Aabb gizmos here, or merge some tools that are not merged yet, like #11237, and move here. I think gizmos has a lot of tools hanging out there that can be moved.

pablo-lua avatar Mar 05 '24 21:03 pablo-lua

I've rebased onto main

matiqo15 avatar Mar 06 '24 18:03 matiqo15