-
-
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
Move Circle Gizmos to Their Own File #10631
Move Circle Gizmos to Their Own File #10631
Conversation
crates/bevy_gizmos/src/lib.rs
Outdated
@@ -17,6 +17,7 @@ | |||
//! See the documentation on [`Gizmos`] for more examples. | |||
|
|||
mod arrows; | |||
mod circles; |
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.
This should probably be pub? Along with arrows
. Currently I don't see any way to access these types externally.
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.
TIL it's possible to have a struct returned by a function which isn't exported anywhere
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.
Yeah, Rust's module privacy rules are bizarre, where you can create "sealed" traits and structs.
This got used to create unimplementable traits, so now they can't fix it.
Currently this is a breaking change, since we're not re-exporting. |
turns out DEFAULT_CIRCLE_SEGMENTS wasn't public before and I want to work on one thing at a time This reverts commit 89211d2.
not sure why I made it public in the first place
it was already documented but apparently past-me put the doc-comment in the wrong place, but it happened to be technically private so the linter didn't complain
Need to re-export (Neglected to mention it but I don't want this to be a breaking change) |
Yeah, if you want to avoid breaking changes that's the plan. Personally I think we should just make the breaking change now :) |
I mean if you want it to be a breaking change that's also fine by me. |
Co-authored-by: François <mockersf@gmail.com>
snaps fingers what i should've said in the first place is "I didn't plan for this to be a breaking change but i'm fine with breaking or non-breaking" |
added migration guide to description |
check-unused-dependencies: "failed to compile |
upstream est31/cargo-udeps#228 and rust-lang/cargo#13004 can run the problematic job locally (to check if it's fixed) with |
## Objective - Give all the intuitive groups of gizmos their own file - don't be a breaking change - don't change Gizmos interface - eventually do arcs too - future types of gizmos should be in their own files - see also bevyengine#9400 ## Solution - Moved `gizmos.circle`, `gizmos.2d_circle`, and assorted helpers into `circles.rs` - Can also do arcs in this MR if y'all want; just figured I should do one thing at a time. ## Changelog - Changed - `gizmos::CircleBuilder` moved to `gizmos::circles::Circle2dBuilder` - `gizmos::Circle2dBuilder` moved to `gizmos::circles::Circle2dBuilder` ## Migration Guide - change `gizmos::CircleBuilder` to `gizmos::circles::Circle2dBuilder` - change `gizmos::Circle2dBuilder` to `gizmos::circles::Circle2dBuilder` --------- Co-authored-by: François <mockersf@gmail.com>
Objective
don't be a breaking changewe decided it's fine to break thisSolution
gizmos.circle
,gizmos.2d_circle
, and assorted helpers intocircles.rs
Changelog
gizmos::CircleBuilder
moved togizmos::circles::Circle2dBuilder
gizmos::Circle2dBuilder
moved togizmos::circles::Circle2dBuilder
Migration Guide
gizmos::CircleBuilder
togizmos::circles::Circle2dBuilder
gizmos::Circle2dBuilder
togizmos::circles::Circle2dBuilder