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

The dependencies used seems to use a very old version of tokio, preventing to use with a more recent one #2

Closed
iXo opened this issue Mar 15, 2023 · 1 comment

Comments

@iXo
Copy link

iXo commented Mar 15, 2023

Hi,

I am new to rust, but I tried to use your crates to download some pictures from google images (is there a way to pick a random one ?).

But my problem is that in my dependencies I am already have tokio as version 1.26.0.

When starting a simple image search (async) like in your sample, I have this error :

thread 'main' panicked at 'there is no timer running, must be called from the context of a Tokio 0.2.x runtime', /home/ixo/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/time/driver/handle.rs:24:32

If I use cargo tree, I see that :

├── image_search v0.4.1
│ ├── async-std v1.12.0
│ │ ├── async-channel v1.8.0
│ │ │ ├── concurrent-queue v2.1.0
│ │ │ │ └── crossbeam-utils v0.8.15 ()
│ │ │ ├── event-listener v2.5.3
│ │ │ └── futures-core v0.3.26
│ │ ├── async-global-executor v2.3.1
│ │ │ ├── async-channel v1.8.0 (
)
│ │ │ ├── async-executor v1.5.0
│ │ │ │ ├── async-lock v2.7.0
│ │ │ │ │ └── event-listener v2.5.3
│ │ │ │ ├── async-task v4.3.0
│ │ │ │ ├── concurrent-queue v2.1.0 (*)
│ │ │ │ .... snip ....
│ │ │ ├── once_cell v1.17.1
│ │ │ └── tokio v0.2.25
...

What can we do ?

@commonkestrel
Copy link
Owner

Seems like http-client uses tokio 0.2, I believe there's something in async-std that can handle runtime errors like this. I'll play around with this and see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants