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

Cannot use bevy::ui::Size #5338

Closed
OragonEfreet opened this issue Jul 16, 2022 · 2 comments
Closed

Cannot use bevy::ui::Size #5338

OragonEfreet opened this issue Jul 16, 2022 · 2 comments
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior

Comments

@OragonEfreet
Copy link

Bevy version

main branch (25d222b73e57f27cf7f346015c7f554dafab131a)

What you did

Take any example code and add use bevy::ui::Size directive.
Run cargo check --example the_example

What went wrong

error[E0432]: unresolved import `bevy::ui::Size`
 --> examples/2d/rotation.rs:3:5
  |
3 | use bevy::ui::Size;
  |     ^^^^^^^^^^^^^^ no `Size` in `ui`

Additional information

Of course a solution is to use the prelude, but according to the migration guide provided in this PR, we should be able to use bevy::ui::Size as well.

@OragonEfreet OragonEfreet added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 16, 2022
@ghost ghost added A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels Jul 16, 2022
@ghost
Copy link

ghost commented Jul 16, 2022

Thank you for the bug report! This problem was caused because the Size was imported twice in the lib.rs of bevy_ui which made it private instead of public.

@ghost ghost closed this as completed Jul 16, 2022
@ghost ghost reopened this Jul 16, 2022
@bors bors bot closed this as completed in f531a94 Jul 16, 2022
@OragonEfreet
Copy link
Author

Thanks for the quick fix!

inodentry pushed a commit to IyesGames/bevy that referenced this issue Aug 8, 2022
# Objective

- Fixes  bevyengine#5338 
- Allow the usage of `use bevy::ui::Size` (see migration guide in bevyengine#4285)

## Solution

- Remove the `use crate::Size` import so that the `pub use geometry::*` import also publicly uses the `Size` struct.
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

- Fixes  bevyengine#5338 
- Allow the usage of `use bevy::ui::Size` (see migration guide in bevyengine#4285)

## Solution

- Remove the `use crate::Size` import so that the `pub use geometry::*` import also publicly uses the `Size` struct.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- Fixes  bevyengine#5338 
- Allow the usage of `use bevy::ui::Size` (see migration guide in bevyengine#4285)

## Solution

- Remove the `use crate::Size` import so that the `pub use geometry::*` import also publicly uses the `Size` struct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant