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

New multi-threaded feature is always enabled #9113

Closed
NiseVoid opened this issue Jul 11, 2023 · 0 comments · Fixed by #9269
Closed

New multi-threaded feature is always enabled #9113

NiseVoid opened this issue Jul 11, 2023 · 0 comments · Fixed by #9269
Labels
A-Core Common functionality for all bevy apps C-Bug An unexpected or incorrect behavior
Milestone

Comments

@NiseVoid
Copy link
Contributor

Bevy version

Bevy 0.11

What you did

I disabled all bevy features, including multi-threaded

What went wrong

Despite the multi-threaded feature being disabled, it still runs multi threaded. Looking at the cargo tree with -e features it seems like bevy internally uses crates with default features, which enables multi-threading on bevy_ecs and bevy_tasks anyway

Additional information

On the application in question no optional features are enabled.

Cargo.toml:

[workspace.dependencies]
bevy = {version = "0.11", default-features=false}

game/server/Cargo.toml:

[dependencies]
bevy.workspace=true

A small part of the cargo tree shows how it i getting enabled:

server v0.1.0 (/home/nisevoid/gamedev/rust-morpg/game/server)
├── bevy v0.11.0
│   └── bevy_internal v0.11.0
│       ├── bevy_a11y feature "default"
│       │   └── bevy_a11y v0.11.0
│       │       ├── bevy_app feature "default"
│       │       │   ├── bevy_app v0.11.0
│       │       │   │   ├── bevy_ecs v0.11.0
│       │       │   │   │   ├── bevy_ptr feature "default"
│       │       │   │   │   │   └── bevy_ptr v0.11.0
│       │       │   │   │   ├── bevy_reflect feature "default"
│       │       │   │   │   │   └── bevy_reflect v0.11.0
│       │       │   │   │   │       ├── bevy_ptr feature "default" (*)
│       │       │   │   │   │       ├── bevy_math feature "default"
│       │       │   │   │   │       │   └── bevy_math v0.11.0
│       │       │   │   │   │       ├── bevy_math feature "serialize"
│       │       │   │   │   │       │   ├── bevy_math v0.11.0 (*)
│       │       │   │   │   │       ├── bevy_reflect_derive feature "default"
│       │       │   │   │   │       ├── bevy_utils feature "default"
│       │       │   │   │   │       │   └── bevy_utils v0.11.0
│       │       │   │   │   ├── bevy_utils feature "default" (*)
│       │       │   │   │   ├── bevy_tasks feature "default"
│       │       │   │   │   │   ├── bevy_tasks v0.11.0
│       │       │   │   │   │   └── bevy_tasks feature "multi-threaded"
│       │       │   │   │   │       └── bevy_tasks v0.11.0 (*)
│       │       │   │   ├── bevy_derive feature "default"
│       │       │   │   ├── bevy_reflect feature "default" (*)
│       │       │   │   ├── bevy_utils feature "default" (*)
│       │       │   │   └── bevy_tasks feature "default" (*)
│       │       │   └── bevy_app feature "bevy_reflect"
│       │       │       ├── bevy_app v0.11.0 (*)
│       │       │       └── bevy_ecs feature "bevy_reflect"
│       │       │           └── bevy_ecs v0.11.0 (*)
│       │       ├── bevy_derive feature "default" (*)
│       │       └── bevy_ecs feature "default"
│       │           ├── bevy_ecs v0.11.0 (*)
│       │           ├── bevy_ecs feature "bevy_reflect" (*)
│       │           └── bevy_ecs feature "multi-threaded"
│       │               ├── bevy_ecs v0.11.0 (*)
│       │               └── bevy_tasks feature "multi-threaded" (*)

The default feature seems to get used almost anywhere where bevy_ecs and bevy_task are used.

@NiseVoid NiseVoid added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 11, 2023
@Selene-Amanita Selene-Amanita added A-Core Common functionality for all bevy apps and removed S-Needs-Triage This issue needs to be labelled labels Jul 11, 2023
@Selene-Amanita Selene-Amanita added this to the 0.11.1 milestone Jul 11, 2023
github-merge-queue bot pushed a commit that referenced this issue Aug 3, 2023
# Objective

Fixes #9113

## Solution

disable `multi-threaded` default feature

## Migration Guide
The `multi-threaded` feature in `bevy_ecs` and `bevy_tasks` is no longer
enabled by default. However, this remains a default feature for the
umbrella `bevy` crate. If you depend on `bevy_ecs` or `bevy_tasks`
directly, you should consider enabling this to allow systems to run in
parallel.
@cart cart modified the milestones: 0.11.1, 0.12 Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Common functionality for all bevy apps C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants