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

Stop using the async-std crate #531

Closed
wants to merge 1 commit into from

Conversation

sophie-h
Copy link
Contributor

The async-std crate didn't had a release in 1 1/2 years and is pulling in a lot of outdated and unnecessary dependencies.

Therefore I replaced all uses with actively maintained crates.

The async-std crate didn't had a release in 1 1/2 years and is pulling
in a lot of outdated and unnecessary dependencies.

Therefore I replaced all uses with actively maintained crates.
@@ -844,8 +844,8 @@ impl Connection {
/// # // https://gitlab.freedesktop.org/zeenix/zbus/-/jobs/34023494
/// # #[cfg(all(not(feature = "tokio"), not(target_os = "windows")))]
/// # {
/// use async_global_executor::{block_on, spawn};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment needs to be adjusted

    /// Here is how one would typically run the zbus executor through async-std's single-threaded
    /// scheduler:

We could also use smol instead of async-global-executor. But that might pull more dependencies.

@zeenix
Copy link
Contributor

zeenix commented Dec 30, 2023

Thanks but async-std is only a dev dep so it dragging in obsolete deps isn't a very compelling argument, I'm afraid. I still want to ensure that zbus continues to work with it.

We primarily use smol-rs crates. Dev deps are irrelevant to our users. Developers shouldn't need to care about async-std being under-mai tainted.

Having said that, if any of the deps brought in by async-std has any security issues, it'd be definitely a compelling argument as we wouldn't want contributors to compromise their dev env.

@sophie-h sophie-h closed this Dec 30, 2023
@sophie-h
Copy link
Contributor Author

The problem with dev dependencies is that distros have to package them as well if they want to run tests. And since the deps of async-std are outdated there will be several versions of the same crate that have to be packaged.

@zeenix
Copy link
Contributor

zeenix commented Dec 31, 2023

The problem with dev dependencies is that distros have to package them as well if they want to run tests.

Oh, I didn't think/know of this aspect. This changes things for sure. :)

I think it'd be best to just use tokio then, since it is the most popular runtime. Could you kindly provide a PR for that?

@sophie-h sophie-h reopened this Jan 4, 2024
@sophie-h
Copy link
Contributor Author

sophie-h commented Jan 4, 2024

Cool. I will hopefully get back to it later this month.

@zeenix
Copy link
Contributor

zeenix commented Jan 5, 2024

I will hopefully get back to it later this month.

Actually, looking at the repo, I still see sufficient recent activity on the project and one year is not that long for a release of a stable project. We've ourselves haven't had a release for more than 6 months now. 😞

Has this already presented an issue for a distro?

@zeenix
Copy link
Contributor

zeenix commented Jan 29, 2024

Has this already presented an issue for a distro?

@sophie-h ?

@sophie-h
Copy link
Contributor Author

Well, the general situation with distros packaging rust apps is not great. One reason that has been reported is the amount of dependencies needed, yes. If this specifically is the most important part, idk.

Right now, zbus is pulling a bunch of older versions of crates that cause us to depend on multiple versions. Maybe that would be more important to tackle first https://sophie-h.pages.gitlab.gnome.org/cargo-lock-analyzer/

@zeenix
Copy link
Contributor

zeenix commented Jan 31, 2024

One reason that has been reported is the amount of dependencies needed, yes

I think this wouldn't be relevant here if the distros didn't insist on dev deps being packaged as well.

zbus is pulling a bunch of older versions of crates that cause us to depend on multiple versions

I'd more more than happy to update deps where possible. I'm also pushing for event-listener crate situation to be resolved soon so we don't end up with multiple versions of that in zbus deps.

Anyway, please do update the PR as discussed before. It's almost been one month now. 😆

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

Successfully merging this pull request may close these issues.

2 participants