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

fix: update doctests to use smol feature #215

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

sinui0
Copy link
Contributor

@sinui0 sinui0 commented Dec 7, 2023

This PR updates the doctests on select and join functions to get rid of the deprecated with-smol-1 feature gate and uses the new smol feature instead.

Closes #214

Should smol be added into [dev-dependencies] so this sort of thing isn't possible? Doctests should ideally run fully without having to enable a feature.

@sinui0
Copy link
Contributor Author

sinui0 commented Dec 7, 2023

FYI, I searched and these are the only locations that contain these stale feature gates.

@thomaseizinger
Copy link
Collaborator

Should smol be added into [dev-dependencies] so this sort of thing isn't possible? Doctests should ideally run fully without having to enable a feature.

We can't do that because we are exposing helper functions here:

xtra/xtra/src/spawn.rs

Lines 31 to 44 in e96ae54

/// Spawns the given actor into the smol runtime, returning an [`Address`](crate::Address) to it.
#[cfg(feature = "smol")]
#[cfg_attr(docsrs, doc(cfg(feature = "smol")))]
pub fn spawn_smol<A>(
actor: A,
(address, mailbox): (crate::Address<A>, crate::Mailbox<A>),
) -> crate::Address<A>
where
A: crate::Actor<Stop = ()>,
{
smol::spawn(crate::run(mailbox, actor)).detach();
address
}
.

@thomaseizinger
Copy link
Collaborator

Can you update to latest master? That should fix CI I believe!

@Restioson
Copy link
Owner

Happy to merge after passes CI

@sinui0
Copy link
Contributor Author

sinui0 commented Jan 31, 2024

All clear

@thomaseizinger thomaseizinger merged commit 8624d85 into Restioson:master Jan 31, 2024
6 checks passed
@sinui0 sinui0 deleted the fix/stale-doctests branch January 31, 2024 23:29
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.

Deprecated feature in doctests
3 participants