From 342be384dc9a690fe01e9fe26f13a3cbc3106f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Mon, 24 Oct 2022 13:46:39 +0000 Subject: [PATCH] Disabling default features support in bevy_ecs, bevy_reflect and bevy (#5993) # Objective - Fix disabling features in bevy_ecs (broken by #5630) - Add tests in CI for bevy_ecs, bevy_reflect and bevy as those crates could be use standalone --- .github/bors.toml | 3 +++ .github/workflows/validation-jobs.yml | 19 +++++++++++++++++++ crates/bevy_ecs/src/change_detection.rs | 1 - 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/bors.toml b/.github/bors.toml index 0380d3003e1a92..7c237230f15cae 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -14,6 +14,9 @@ status = [ "check-compiles", "build-and-install-on-iOS", "run-examples-on-windows-dx12", + "build-without-default-features (bevy)", + "build-without-default-features (bevy_ecs)", + "build-without-default-features (bevy_reflect)", ] use_squash_merge = true diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml index 57d2a2f34ca9ac..f280a70a5c121f 100644 --- a/.github/workflows/validation-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -154,3 +154,22 @@ jobs: with: name: screenshots path: .github/start-wasm-example/screenshot-*.png + + build-without-default-features: + strategy: + matrix: + crate: [bevy_ecs, bevy_reflect, bevy] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install alsa and udev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + - name: Build + run: cargo build -p ${{ matrix.crate }} --no-default-features + env: + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-C debuginfo=0 -D warnings" diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs index 914b1951376bfd..f808106a0be00c 100644 --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -1,7 +1,6 @@ //! Types that detect when their internal data mutate. use crate::{component::ComponentTicks, ptr::PtrMut, system::Resource}; -#[cfg(feature = "bevy_reflect")] use std::ops::{Deref, DerefMut}; /// The (arbitrarily chosen) minimum number of world tick increments between `check_tick` scans.