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

Re-export poll_once from Bevy #10664

Closed
Shatur opened this issue Nov 20, 2023 · 1 comment · Fixed by #10670
Closed

Re-export poll_once from Bevy #10664

Shatur opened this issue Nov 20, 2023 · 1 comment · Fixed by #10670
Labels
A-Tasks Tools for parallel and async work C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@Shatur
Copy link
Contributor

Shatur commented Nov 20, 2023

What problem does this solve or what need does it fill?

In order to perform async tasks users need to use futures-lite, see async_compute example.

What solution would you like?

It would be great to re-export future module from bevy::tasks to avoid adding futures-lite explicitly in Cargo.toml. And I would probably remove block_on from the prelude.

Additional context

See also #10504

@Shatur Shatur added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled D-Trivial Nice and easy! A great choice to get started with Bevy labels Nov 20, 2023
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Tasks Tools for parallel and async work and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Nov 20, 2023
@BD103
Copy link
Member

BD103 commented Nov 21, 2023

I'd like to claim this issue, if possible. :)


Edit: PR created in #10670

github-merge-queue bot pushed a commit that referenced this issue Nov 21, 2023
# Objective

- Fixes #10664

## Solution

- `pub use futures_lite as future` :)

---

## Changelog

- Made `futures_lite` available as `future` in the `bevy_tasks` module.

## Migration Guide

- Remove `futures_lite` from `Cargo.toml`.

```diff
[dependencies]
bevy = "0.12.0"
- futures-lite = "1.4.0"
```

- Replace `futures_lite` imports with `bevy::tasks::future`.

```diff
- use futures_lite::poll_once;
+ use bevy::tasks::future::poll_once;
```
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this issue Jan 9, 2024
# Objective

- Fixes bevyengine#10664

## Solution

- `pub use futures_lite as future` :)

---

## Changelog

- Made `futures_lite` available as `future` in the `bevy_tasks` module.

## Migration Guide

- Remove `futures_lite` from `Cargo.toml`.

```diff
[dependencies]
bevy = "0.12.0"
- futures-lite = "1.4.0"
```

- Replace `futures_lite` imports with `bevy::tasks::future`.

```diff
- use futures_lite::poll_once;
+ use bevy::tasks::future::poll_once;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants