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

WorldQuery generates structs with public fields without documentation, breaking builds with #![deny(missing_docs)] #8333

Closed
mvlabat opened this issue Apr 8, 2023 · 1 comment · Fixed by #8334
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior C-Docs An addition or correction to our documentation C-Regression Functionality that used to work but no longer does. Add a test for this! D-Trivial Nice and easy! A great choice to get started with Bevy
Milestone

Comments

@mvlabat
Copy link
Contributor

mvlabat commented Apr 8, 2023

Bevy version

0.10.1

What you did

I tried to compile bevy_egui with Bevy 0.10.1 version, which has the following code triggering the issue:

https://github.com/mvlabat/bevy_egui/blob/main/src/lib.rs#L610-L628

/// Queries all the Egui related components.
#[derive(WorldQuery)]
#[world_query(mutable)]
pub struct EguiContextQuery {
    /// Window entity.
    pub window_entity: Entity,
    /// Egui context associated with the window.
    pub ctx: &'static mut EguiContext,
    /// Encapsulates [`egui::RawInput`].
    pub egui_input: &'static mut EguiInput,
    /// Egui shapes and textures delta.
    pub render_output: &'static mut EguiRenderOutput,
    /// Encapsulates [`egui::PlatformOutput`].
    pub egui_output: &'static mut EguiOutput,
    /// Stores physical size of the window and its scale factor.
    pub window_size: &'static mut WindowSize,
    /// [`Window`] component.
    pub window: &'static mut Window,
}

What went wrong

The build failed with the following error (as there's crate level #![deny(missing_docs)]):

error: missing documentation for a struct field
Error:    --> src/lib.rs:611:10
    |
611 | #[derive(WorldQuery)]
    |          ^^^^^^^^^^
    |
    = note: `-D missing-docs` implied by `-D warnings`
    = note: this error originates in the derive macro `WorldQuery` (in Nightly builds, run with -Z macro-backtrace for more info)

Additional information

It seems that this regression was introduced specifically in 0.10.1.

@mvlabat mvlabat added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 8, 2023
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation and removed S-Needs-Triage This issue needs to be labelled labels Apr 8, 2023
@alice-i-cecile alice-i-cecile added this to the 0.11 milestone Apr 8, 2023
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Regression Functionality that used to work but no longer does. Add a test for this! D-Trivial Nice and easy! A great choice to get started with Bevy labels Apr 8, 2023
@Friz64
Copy link
Contributor

Friz64 commented Apr 8, 2023

Caused by #8163.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior C-Docs An addition or correction to our documentation C-Regression Functionality that used to work but no longer does. Add a test for this! D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants