mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Fix doc warnings (#3339)
# Objective - There are a few warnings when building Bevy docs for dead links - CI seems to not catch those warnings when it should ## Solution - Enable doc CI on all Bevy workspace - Fix warnings - Also noticed plugin GilrsPlugin was not added anymore when feature was enabled First commit to check that CI would actually fail with it: https://github.com/bevyengine/bevy/runs/4532652688?check_suite_focus=true Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
This commit is contained in:
parent
3974e02fd1
commit
6a0008f3d3
11 changed files with 36 additions and 33 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -273,7 +273,7 @@ jobs:
|
|||
- name: Installs cargo-deadlinks
|
||||
run: cargo install --force cargo-deadlinks
|
||||
- name: Build and check doc
|
||||
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps
|
||||
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps
|
||||
- name: Checks dead links
|
||||
run: cargo deadlinks --dir target/doc/bevy
|
||||
continue-on-error: true
|
||||
|
|
|
@ -234,9 +234,9 @@ impl ButtonAxisSettings {
|
|||
}
|
||||
}
|
||||
|
||||
/// Monitors gamepad connection and disconnection events, updating the [GamepadLobby] resource accordingly
|
||||
/// Monitors gamepad connection and disconnection events, updating the [`Gamepads`] resource accordingly
|
||||
///
|
||||
/// By default, runs during `CoreStage::PreUpdate` when added via [InputPlugin].
|
||||
/// By default, runs during `CoreStage::PreUpdate` when added via [`InputPlugin`](crate::InputPlugin).
|
||||
pub fn gamepad_connection_system(
|
||||
mut gamepads: ResMut<Gamepads>,
|
||||
mut gamepad_event: EventReader<GamepadEvent>,
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
use bevy_app::{PluginGroup, PluginGroupBuilder};
|
||||
|
||||
/// This plugin group will add all the default plugins:
|
||||
/// * [`LogPlugin`]
|
||||
/// * [`CorePlugin`]
|
||||
/// * [`TransformPlugin`]
|
||||
/// * [`DiagnosticsPlugin`]
|
||||
/// * [`InputPlugin`]
|
||||
/// * [`WindowPlugin`]
|
||||
/// * [`AssetPlugin`]
|
||||
/// * [`ScenePlugin`]
|
||||
/// * [`RenderPlugin`] - with feature `bevy_render`
|
||||
/// * [`SpritePlugin`] - with feature `bevy_sprite`
|
||||
/// * [`PbrPlugin`] - with feature `bevy_pbr`
|
||||
/// * [`UiPlugin`] - with feature `bevy_ui`
|
||||
/// * [`TextPlugin`] - with feature `bevy_text`
|
||||
/// * [`AudioPlugin`] - with feature `bevy_audio`
|
||||
/// * [`GilrsPlugin`] - with feature `bevy_gilrs`
|
||||
/// * [`GltfPlugin`] - with feature `bevy_gltf`
|
||||
/// * [`WinitPlugin`] - with feature `bevy_winit`
|
||||
/// * [`LogPlugin`](bevy_log::LogPlugin)
|
||||
/// * [`CorePlugin`](bevy_core::CorePlugin)
|
||||
/// * [`TransformPlugin`](bevy_transform::TransformPlugin)
|
||||
/// * [`DiagnosticsPlugin`](bevy_diagnostic::DiagnosticsPlugin)
|
||||
/// * [`InputPlugin`](bevy_input::InputPlugin)
|
||||
/// * [`WindowPlugin`](bevy_window::WindowPlugin)
|
||||
/// * [`AssetPlugin`](bevy_asset::AssetPlugin)
|
||||
/// * [`ScenePlugin`](bevy_scene::ScenePlugin)
|
||||
/// * [`RenderPlugin`](bevy_render::RenderPlugin) - with feature `bevy_render`
|
||||
/// * [`SpritePlugin`](bevy_sprite::SpritePlugin) - with feature `bevy_sprite`
|
||||
/// * [`PbrPlugin`](bevy_pbr::PbrPlugin) - with feature `bevy_pbr`
|
||||
/// * [`UiPlugin`](bevy_ui::UiPlugin) - with feature `bevy_ui`
|
||||
/// * [`TextPlugin`](bevy_text::TextPlugin) - with feature `bevy_text`
|
||||
/// * [`AudioPlugin`](bevy_audio::AudioPlugin) - with feature `bevy_audio`
|
||||
/// * [`GilrsPlugin`](bevy_gilrs::GilrsPlugin) - with feature `bevy_gilrs`
|
||||
/// * [`GltfPlugin`](bevy_gltf::GltfPlugin) - with feature `bevy_gltf`
|
||||
/// * [`WinitPlugin`](bevy_winit::WinitPlugin) - with feature `bevy_winit`
|
||||
///
|
||||
/// See also [`MinimalPlugins`] for a slimmed down option
|
||||
pub struct DefaultPlugins;
|
||||
|
@ -59,12 +59,15 @@ impl PluginGroup for DefaultPlugins {
|
|||
|
||||
#[cfg(feature = "bevy_audio")]
|
||||
group.add(bevy_audio::AudioPlugin::default());
|
||||
|
||||
#[cfg(feature = "bevy_gilrs")]
|
||||
group.add(bevy_gilrs::GilrsPlugin::default());
|
||||
}
|
||||
}
|
||||
|
||||
/// Minimal plugin group that will add the following plugins:
|
||||
/// * [`CorePlugin`]
|
||||
/// * [`ScheduleRunnerPlugin`]
|
||||
/// * [`CorePlugin`](bevy_core::CorePlugin)
|
||||
/// * [`ScheduleRunnerPlugin`](bevy_app::ScheduleRunnerPlugin)
|
||||
///
|
||||
/// See also [`DefaultPlugins`] for a more complete set of plugins
|
||||
pub struct MinimalPlugins;
|
||||
|
|
|
@ -35,7 +35,7 @@ pub struct Mesh {
|
|||
/// Contains geometry in the form of a mesh.
|
||||
///
|
||||
/// Often meshes are automatically generated by bevy's asset loaders or primitives, such as
|
||||
/// [`crate::shape::Cube`] or [`crate::shape::Box`], but you can also construct
|
||||
/// [`shape::Cube`](crate::mesh::shape::Cube) or [`shape::Box`](crate::mesh::shape::Box), but you can also construct
|
||||
/// one yourself.
|
||||
///
|
||||
/// Example of constructing a mesh:
|
||||
|
|
|
@ -38,7 +38,7 @@ pub trait Draw<P: PhaseItem>: Send + Sync + 'static {
|
|||
pub trait PhaseItem: Send + Sync + 'static {
|
||||
/// The type used for ordering the items. The smallest values are drawn first.
|
||||
type SortKey: Ord;
|
||||
/// Determines the order in which the items are drawn during the corresponding [`RenderPhase`].
|
||||
/// Determines the order in which the items are drawn during the corresponding [`RenderPhase`](super::RenderPhase).
|
||||
fn sort_key(&self) -> Self::SortKey;
|
||||
/// Specifies the [`Draw`] function used to render the item.
|
||||
fn draw_function(&self) -> DrawFunctionId;
|
||||
|
|
|
@ -5,7 +5,7 @@ use bevy_utils::tracing::debug;
|
|||
use std::ops::Range;
|
||||
use wgpu::{IndexFormat, RenderPass};
|
||||
|
||||
/// Tracks the current [`TrackedRenderPipeline`] state to ensure draw calls are valid.
|
||||
/// Tracks the current [`TrackedRenderPass`] state to ensure draw calls are valid.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct DrawState {
|
||||
pipeline: Option<RenderPipelineId>,
|
||||
|
|
|
@ -32,7 +32,7 @@ pub enum ShaderReflectError {
|
|||
Validation(#[from] naga::valid::ValidationError),
|
||||
}
|
||||
|
||||
/// A shader, as defined by its [ShaderSource] and [ShaderStage]
|
||||
/// A shader, as defined by its [`ShaderSource`] and [`ShaderStage`](naga::ShaderStage)
|
||||
/// This is an "unprocessed" shader. It can contain preprocessor directives.
|
||||
#[derive(Debug, Clone, TypeUuid)]
|
||||
#[uuid = "d95bc916-6c55-4de3-9622-37e7b6969fda"]
|
||||
|
|
|
@ -137,12 +137,12 @@ impl RenderDevice {
|
|||
Sampler::from(wgpu_sampler)
|
||||
}
|
||||
|
||||
/// Create a new [`SwapChain`](wgpu::SwapChain) which targets `surface`.
|
||||
/// Initializes [`Surface`](wgpu::Surface) for presentation.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - A old [`SwapChainFrame`](wgpu::SwapChain) is still alive referencing an old swap chain.
|
||||
/// - Texture format requested is unsupported on the swap chain.
|
||||
/// - A old [`SurfaceTexture`](wgpu::SurfaceTexture) is still alive referencing an old surface.
|
||||
/// - Texture format requested is unsupported on the surface.
|
||||
pub fn configure_surface(&self, surface: &wgpu::Surface, config: &wgpu::SurfaceConfiguration) {
|
||||
surface.configure(&self.device, config)
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ pub trait Volume {
|
|||
}
|
||||
|
||||
impl Volume for Extent3d {
|
||||
/// Calculates the volume of the [`Extent3D`].
|
||||
/// Calculates the volume of the [`Extent3d`].
|
||||
fn volume(&self) -> usize {
|
||||
(self.width * self.height * self.depth_or_array_layers) as usize
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ pub struct Msaa {
|
|||
/// The number of samples to run for Multi-Sample Anti-Aliasing. Higher numbers result in
|
||||
/// smoother edges. Note that WGPU currently only supports 1 or 4 samples.
|
||||
/// Ultimately we plan on supporting whatever is natively supported on a given device.
|
||||
/// Check out this issue for more info: https://github.com/gfx-rs/wgpu/issues/1832
|
||||
/// Check out this issue for more info: <https://github.com/gfx-rs/wgpu/issues/1832>
|
||||
pub samples: u32,
|
||||
}
|
||||
|
||||
|
|
|
@ -552,8 +552,8 @@ pub struct WindowDescriptor {
|
|||
/// - iOS / Android / Web: Unsupported.
|
||||
/// - macOS X: Not working as expected.
|
||||
/// - Windows 11: Not working as expected
|
||||
/// macOS X transparent works with winit out of the box, so this issue might be related to: https://github.com/gfx-rs/wgpu/issues/687
|
||||
/// Windows 11 is related to https://github.com/rust-windowing/winit/issues/2082
|
||||
/// macOS X transparent works with winit out of the box, so this issue might be related to: <https://github.com/gfx-rs/wgpu/issues/687>
|
||||
/// Windows 11 is related to <https://github.com/rust-windowing/winit/issues/2082>
|
||||
pub transparent: bool,
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub canvas: Option<String>,
|
||||
|
|
Loading…
Reference in a new issue