Skip to content

Conversation

@alice-i-cecile
Copy link
Member

Objective

cargo test --package bevy_ecs --lib --all-features

fails to compile, with output like

error[E0433]: failed to resolve: could not find Serialize in serde
--> crates/bevy_ecs/src/entity/index_set.rs:14:69
|
14 | #[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))]
| ^^^^^^^^^ could not find Serialize in serde
|
note: found an item that was configured out
--> /home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:343:37
|
343 | pub use serde_derive::{Deserialize, Serialize};
| ^^^^^^^^^
note: the item is gated behind the serde_derive feature
--> /home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:341:7
|
341 | #[cfg(feature = "serde_derive")]
| ^^^^^^^^^^^^^^^^^^^^^^^^

Solution

Add the required feature flags and get bevy_ecs compiling standalone corrctly.

Testing

The command above now compiles succesfully. Note that several system stepping tests are failing, and were not being tested in CI. That's a different PR's problem though.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events P-Compile-Failure A failure to compile Bevy apps S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 3, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Feb 3, 2025
@alice-i-cecile alice-i-cecile marked this pull request as ready for review February 3, 2025 01:26
@alice-i-cecile
Copy link
Member Author

@villor, I think this started in your EntityIndexSet series of PRs, based on the places I was seeing these errors. No worries though; it's an easy fix.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 3, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 3, 2025
Merged via the queue into bevyengine:main with commit da50648 Feb 3, 2025
39 checks passed
@villor
Copy link
Contributor

villor commented Feb 3, 2025

@villor, I think this started in your EntityIndexSet series of PRs, based on the places I was seeing these errors. No worries though; it's an easy fix.

I think you got the wrong Vic 😅
@Victoronz

@Victoronz
Copy link
Contributor

@villor, I think this started in your EntityIndexSet series of PRs, based on the places I was seeing these errors. No worries though; it's an easy fix.

I think you got the wrong Vic 😅
@Victoronz

It wasn't my PR, since I had missed the Deserialize/Serialize impls!

#17620 added them, so I'll forward the ping once more to @Jondolf 😆

mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 4, 2025
# Objective

```
cargo test --package bevy_ecs --lib --all-features
```

fails to compile, with output like

> error[E0433]: failed to resolve: could not find `Serialize` in `serde`
>    --> crates/bevy_ecs/src/entity/index_set.rs:14:69
>     |
> 14 | #[cfg_attr(feature = "serialize", derive(serde::Deserialize,
serde::Serialize))]
> | ^^^^^^^^^ could not find `Serialize` in `serde`
>     |
> note: found an item that was configured out
> -->
/home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:343:37
>     |
> 343 | pub use serde_derive::{Deserialize, Serialize};
>     |                                     ^^^^^^^^^
> note: the item is gated behind the `serde_derive` feature
> -->
/home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:341:7
>     |
> 341 | #[cfg(feature = "serde_derive")]
>     |       ^^^^^^^^^^^^^^^^^^^^^^^^


## Solution

Add the required feature flags and get bevy_ecs compiling standalone
corrctly.

## Testing

The command above now compiles succesfully. Note that several system
stepping tests are failing, and were not being tested in CI. That's a
different PR's problem though.
joshua-holmes pushed a commit to joshua-holmes/bevy that referenced this pull request Feb 5, 2025
# Objective

```
cargo test --package bevy_ecs --lib --all-features
```

fails to compile, with output like

> error[E0433]: failed to resolve: could not find `Serialize` in `serde`
>    --> crates/bevy_ecs/src/entity/index_set.rs:14:69
>     |
> 14 | #[cfg_attr(feature = "serialize", derive(serde::Deserialize,
serde::Serialize))]
> | ^^^^^^^^^ could not find `Serialize` in `serde`
>     |
> note: found an item that was configured out
> -->
/home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:343:37
>     |
> 343 | pub use serde_derive::{Deserialize, Serialize};
>     |                                     ^^^^^^^^^
> note: the item is gated behind the `serde_derive` feature
> -->
/home/alice/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.217/src/lib.rs:341:7
>     |
> 341 | #[cfg(feature = "serde_derive")]
>     |       ^^^^^^^^^^^^^^^^^^^^^^^^


## Solution

Add the required feature flags and get bevy_ecs compiling standalone
corrctly.

## Testing

The command above now compiles succesfully. Note that several system
stepping tests are failing, and were not being tested in CI. That's a
different PR's problem though.
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 D-Trivial Nice and easy! A great choice to get started with Bevy P-Compile-Failure A failure to compile Bevy apps S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants