It's possible to compile bevy_image
with feature = "dds"
, without also doing the same for bevy_core_pipeline
or bevy_gltf
, resulting in a compilation error
#17290
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
P-Compile-Failure
A failure to compile Bevy apps
S-Needs-Design
This issue requires design work to think about how it would best be accomplished
When running
cargo clippy --tests --all-features --package bevy_image
(--tests
isn't technically required, but it prevents currently-existing errors withbevy_math
from surfacing),bevy_core_pipeline
will fail to compile due to not providing a required argument tobevy_image::Image::from_buffer()
.Full compilation error log
After some investigation, I found the issue: if debug assertions are enabled, and
bevy_image
is compiled with--features dds
, thenbevy_core_pipeline
must also be compiled with--features dds
, otherwise a compilation error will occur withbevy_core_pipeline
. To explain:bevy_image::Image::from_buffer()
takes aname
parameter - but only if--features bevy_image/dds
is specified [1]bevy_core_pipeline
will, under certain circumstances, callImage::from_buffer()
. If--features bevy_core_pipeline/dds
is specified, thenbevy_core_pipeline
will pass in thename
parameter. [1] [2] [3]bevy_core_pipeline/dds
feature will enablebevy_image/dds
if it isn't already [1]bevy_image/dds
does not enablebevy_core_pipeline/dds
, it's possible to compile withbevy_image/dds
but withoutbevy_core_pipeline/dds
, leading to this compilation error.I am unsure how to resolve this issue, hence I'm making this bug report.
The text was updated successfully, but these errors were encountered: