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

Add bevy_dev_tools crate #11341

Merged
merged 12 commits into from
Mar 6, 2024
Merged

Add bevy_dev_tools crate #11341

merged 12 commits into from
Mar 6, 2024

Conversation

matiqo15
Copy link
Member

Objective

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 matiqo15 added the C-Enhancement A new feature label Jan 14, 2024
@alice-i-cecile alice-i-cecile added X-Controversial There is active debate or serious implications around merging this PR A-Editor Graphical tools to make Bevy games labels Jan 14, 2024
@alice-i-cecile
Copy link
Member

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.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

I think we can make the docs clearer, by focusing on a well-defined niche. That's non-blocking though, and I think this is the right step at this time.

Cargo.toml Outdated Show resolved Hide resolved
@mockersf
Copy link
Member

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

@alice-i-cecile
Copy link
Member

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.

@matiqo15
Copy link
Member Author

matiqo15 commented Jan 15, 2024

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.

@alice-i-cecile
Copy link
Member

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.

@cart
Copy link
Member

cart commented Jan 19, 2024

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

@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 Jan 22, 2024
@BD103
Copy link
Member

BD103 commented Mar 5, 2024

#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?

Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

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

A few changes requested, mainly with the bump to 0.14.0-dev.

crates/bevy_dev_tools/Cargo.toml Outdated Show resolved Hide resolved
crates/bevy_dev_tools/src/lib.rs Outdated Show resolved Hide resolved
crates/bevy_internal/Cargo.toml Outdated Show resolved Hide resolved
crates/bevy_render/Cargo.toml Outdated Show resolved Hide resolved
crates/bevy_time/Cargo.toml Outdated Show resolved Hide resolved
@alice-i-cecile
Copy link
Member

#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 :)

@pablo-lua
Copy link
Contributor

pablo-lua commented Mar 5, 2024

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.

@matiqo15
Copy link
Member Author

matiqo15 commented Mar 6, 2024

I've rebased onto main

matiqo15 and others added 3 commits March 6, 2024 19:21
Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

I'm happy with where this landed and how it is communicated to users in the documentation. Still slightly worried about the "grab bag" nature of this. We should pay careful attention to what ends up in here and consider spinning specific features out into their own crates as they mature / expand.

@cart cart added this pull request to the merge queue Mar 6, 2024
Merged via the queue into bevyengine:main with commit 6533170 Mar 6, 2024
29 checks passed
@alice-i-cecile alice-i-cecile added the C-Needs-Release-Note Work that should be called out in the blog due to impact label Mar 6, 2024
github-merge-queue bot pushed a commit that referenced this pull request Mar 7, 2024
# Objective

- #11341 broke running code using `MinimalPlugins` in CI

## Solution

- include `DevToolsPlugin` in `MinimalPlugins`
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective

- Resolves bevyengine#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?

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective

- bevyengine#11341 broke running code using `MinimalPlugins` in CI

## Solution

- include `DevToolsPlugin` in `MinimalPlugins`
github-merge-queue bot pushed a commit that referenced this pull request Mar 17, 2024
# Objective

Fixes typo by #11341.
Functionally doesn't change anything other than naming consistency and
stop IDE's from screaming at you.
@alice-i-cecile alice-i-cecile removed the C-Needs-Release-Note Work that should be called out in the blog due to impact label May 27, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Editor Graphical tools to make Bevy games C-Enhancement A new feature S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create bevy_debug crate
9 participants