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(deps): update rust crate async-std to 1.12.0 - autoclosed #316

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 2, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
async-std (source) dependencies minor 1 -> 1.12.0

Release Notes

async-rs/async-std (async-std)

v1.12.0

Compare Source

Added

  • std::task::spawn_blocking is now stabilized. We consider it a fundamental API for bridging between blocking code and async code, and we widely use it within async-std's own implementation.
  • Add TryFrom implementations to convert TcpListener, TcpStream, UdpSocket, UnixDatagram, UnixListener, and UnixStream to their synchronous equivalents, including putting them back into blocking mode.

Changed

  • async-std no longer depends on num_cpus; it uses functionality in the standard library instead (via async-global-executor).
  • Miscellaneous documentation fixes and cleanups.

v1.11.0

Compare Source

This release improves compile times by up to 55% on initial builds, and up to 75% on recompilation. Additionally we've added a few new APIs and made some tweaks.

Added

  • TcpListener::into_incoming to convert a TcpListener into a stream of incoming TCP connections

Removed

  • The internal extension_trait macro had been removed. This drastically improves compile times for async-std, but changes the way our documentation is rendered. This is a cosmetic change only, and all existing code should continue to work as it did before.

Changed

  • Some internal code has been de-macro-ified, making for quicker compile times.
  • We now use the default recursion limit.

Docs

  • Several docs improvements / fixes.

v1.10.0

Compare Source

This release comes with an assortment of small features and fixes.

Added

  • File now implements Clone so that Files can be passed into closures for use in spawn_blocking.
    • File's contents are already wrapped in Arcs, so the implementation of Clone is straightforward.
  • task::try_current() which returns a handle to the current task if called within the context of a task created by async-std.
  • async_std::io now re-exports WriteExt directly.

Fixed

  • write! now takes already written bytes into account on File.

Internal

  • TcpStream now properly makes use of vectored IO.
  • The net::*::Incoming implementations now do less allocation.

Docs

  • Several docs improvements / fixes.

v1.9.0

Compare Source

This patch stabilizes the async_std::channel submodule, removes the
deprecated sync::channel types, and introduces the tokio1 feature.

New Channels

As part of our 1.8.0 release last month we introduced the new
async_std::channel submodule and deprecated the unstable
async_std::sync::channel types. You can read our full motivation for this
change in the last patch notes. But the short version is that the old
channels had some fundamental problems, and the sync submodule is a bit of
a mess.

This release of async-std promotes async_std::channel to stable, and
fully removes the async_std::sync::channel types. In practice many
libraries have already been upgraded to the new channels in the past month,
and this will enable much of the ecosystem to switch off "unstable" versions
of async-std.

use async_std::channel;

let (sender, receiver) = channel::unbounded();

assert_eq!(sender.send("Hello").await, Ok(()));
assert_eq!(receiver.recv().await, Ok("Hello"));

Tokio 1.0 compat

The Tokio project recently released version 1.0 of their runtime, and the
async-std team would like to congratulate the Tokio team on achieving this
milestone.

This release of async-std adds the tokio1 feature flag, enabling Tokio's
TLS constructors to be initialized within the async-std runtime. This is in
addition to the tokio02 and tokio03 feature flags which we were already
exposing.

In terms of stability it's worth noting that we will continue to provide
support for the tokio02, tokio03, and tokio1 on the current major
release line of async-std. These flags are part of our public API, and
removing compat support for older Tokio versions is considered a breaking
change.

Added

  • Added the tokio1 feature (#​924)
  • Stabilized the async_std::channel submodule (#​934)

Removed

  • Removed deprecated sync::channel (#​933)

Fixed

  • Fixed a typo for [sic] FuturesExt trait (#​930)
  • Update the link to cargo-edit in the installation section of the docs (#​932)
  • Fixed a small typo for stream (#​926)

Internal

  • Updated rand to 0.8 (#​923)
  • Migrated RwLock and Barrier to use the async-lock crate internally (#​925)
  • Replaced uses of deprecated the compare_and_swap method with compare_exchange (#​927)

v1.8.0

Compare Source

This patch introduces async_std::channel, a new submodule for our async channels implementation. channels have been one of async-std's most requested features, and have existed as "unstable" for the past year. We've been cautious about stabilizing channels, and this caution turned out to be warranted: we realized our channels could hang indefinitely under certain circumstances, and people ended up expressing a need for unbounded channels.

So today we're introducing the new async_std::channel submodule which exports the async-channel crate, and we're marking the older unstable async_std::sync::channel API as "deprecated". This release includes both APIs, but we intend to stabilize async_std::channel and remove the older API in January. This should give dependent projects a month to upgrade, though we can extend that if it proves to be too short.

The rationale for adding a new top-level channel submodule, rather than extending sync is that the std::sync and async_std::sync submodule are a bit of a mess, and the libs teamhttps://togithub.com/rust-lang/rfcs/pull/2788#discussion_r339092478b.com/rust-lang/rfcs/pull/2788#discussion_r339092478)) into separate modules. The stdlib has to guarantee it'll forever be backwards compatible, but async-std does not (we fully expect a 2.0 once we have async closures & traits). So we're experimenting with this change before std does, with the expectation that this change can serve as a data point when the libs team decides how to proceed in std.

Added
  • async_std::channel as "unstable" #​915
  • async_std::process as "unstable" #​916
Fixed
  • Fixed mentions of the tokio03 flags in the docs #​909
  • Fixed a double drop issue in StreamExt::cycle #​903
Internal
  • updated pin-project to v0.2.0

v1.7.0

Compare Source

This patch adds a feature to enable compatibility with the new tokio 0.3.0
release, and updates internal dependencies.

Added

Internal

  • chore: update dependencies (#​897)

v1.6.5

Compare Source

Fixed

  • Fix TcpListener::incoming. (#​889)
  • Fix tokio compatibility flag. (#​882)

v1.6.4

Compare Source

Added

  • Added UdpSocket::peek and UdpSocket::peek_from (#​853)

Changed

Fixed

  • Ensure UnixStream::into_raw_fd doesn't close the file descriptor (#​855)
  • Fixed wasm builds and ensured better dependency management depending on the compile target (#​863)

v1.6.3

Added

Changed

  • Switched from smol to individual executor parts. (#​836)
  • Replaced internal Mutex implementation with async-mutex. (#​822)

Fixed

  • Added missing Send guards to Stream::collect. (#​665)

v1.6.2

Added

  • Add UdpSocket::peer_addr (#​816)

Changed

Fixed

  • Ensure the reactor is running for sockets and timers (#​819).
  • Avoid excessive polling in flatten and flat_map (#​701)

v1.6.1

Compare Source

Added

  • Added tokio02 feature flag, to allow compatibility usage with tokio@0.2 (#​804).

Changed

  • Removed unstable stdio lock methods, due to their unsoundness (#​807).

Fixed

  • Fixed wrong slice index for file reading (#​802).
  • Fixed recursive calls to block_on (#​799) and (#​809).
  • Remove default feature requirement for the unstable feature (#​806).

v1.6.0

Compare Source

See 1.6.0-beta.1 and 1.6.0-beta.2.

v1.5.0

Compare Source

API Documentation

This patch includes various quality of life improvements to async-std.
Including improved performance, stability, and the addition of various
Clone impls that replace the use of Arc in many cases.

Added

  • Added links to various ecosystem projects from the README (#​660)
  • Added an example on FromStream for Result<T, E> (#​643)
  • Added stream::pending as "unstable" (#​615)
  • Added an example of stream::timeout to document the error flow (#​675)
  • Implement Clone for DirEntry (#​682)
  • Implement Clone for TcpStream (#​689)

Changed

  • Removed internal comment on stream::Interval (#​645)
  • The "unstable" feature can now be used without requiring the "default" feature (#​647)
  • Removed unnecessary trait bound on stream::FlatMap (#​651)
  • Updated the "broadcaster" dependency used by "unstable" to 1.0.0 (#​681)
  • Updated async-task to 1.2.1 (#​676)
  • task::block_on now parks after a single poll, improving performance in many cases (#​684)
  • Improved reading flow of the "client" part of the async-std tutorial (#​550)
  • Use take_while instead of scan in impl of Product, Sum and FromStream (#​667)
  • TcpStream::connect no longer uses a thread from the threadpool, improving performance (#​687)

Fixed

  • Fixed crate documentation typo (#​655)
  • Fixed documentation for UdpSocket::recv (#​648)
  • Fixed documentation for UdpSocket::send (#​671)
  • Fixed typo in stream documentation (#​650)
  • Fixed typo on sync::JoinHandle documentation (#​659)
  • Removed use of std::error::Error::description which failed CI (#​661)
  • Removed the use of rustfmt's unstable format_code_in_doc_comments option which failed CI (#​685)
  • Fixed a code typo in the task::sleep example (#​688)

v1.4.0

Compare Source

API Documentation

This patch adds Future::timeout, providing a method counterpart to the
future::timeout free function. And includes several bug fixes around missing
APIs. Notably we're not shipping our new executor yet, first announced on our
blog
.

Examples

use async_std::prelude::*;
use async_std::future;
use std::time::Duration;

let fut = future::pending::<()>(); // This future will never resolve.
let res = fut.timeout(Duration::from_millis(100)).await;
assert!(res.is_err()); // The future timed out, returning an err.

Added

  • Added Future::timeout as "unstable" (#​600)

Fixes

  • Fixed a doc test and enabled it on CI (#​597)
  • Fixed a rendering issue with the stream submodule documentation (#​621)
  • Write::write_fmt's future is now correctly marked as #[must_use] (#​628)
  • Fixed the missing io::Bytes export (#​633)
  • Fixed the missing io::Chain export (#​633)
  • Fixed the missing io::Take export (#​633)

v1.3.0

Compare Source

API Documentation

This patch introduces Stream::delay, more methods on DoubleEndedStream,
and improves compile times. Stream::delay is a new API that's similar to
task::sleep,
but can be passed as part of as stream, rather than as a separate block. This is
useful for examples, or when manually debugging race conditions.

Examples

let start = Instant::now();
let mut s = stream::from_iter(vec![0u8, 1]).delay(Duration::from_millis(200));

// The first time will take more than 200ms due to delay.
s.next().await;
assert!(start.elapsed().as_millis() >= 200);

// There will be no delay after the first time.
s.next().await;
assert!(start.elapsed().as_millis() <= 210);

Added

  • Added Stream::delay as "unstable" (#​309)
  • Added DoubleEndedStream::next_back as "unstable" (#​562)
  • Added DoubleEndedStream::nth_back as "unstable" (#​562)
  • Added DoubleEndedStream::rfind as "unstable" (#​562)
  • Added DoubleEndedStream::rfold as "unstable" (#​562)
  • Added DoubleEndedStream::try_rfold as "unstable" (#​562)
  • stream::Once now implements DoubleEndedStream (#​562)
  • stream::FromIter now implements DoubleEndedStream (#​562)

Changed

  • Removed our dependency on async-macros, speeding up compilation (#​610)

Fixes

  • Fixed a link in the task docs (#​598)
  • Fixed the UdpSocket::recv example (#​603)
  • Fixed a link to task::block_on (#​608)
  • Fixed an incorrect API mention in task::Builder (#​612)
  • Fixed leftover mentions of futures-preview (#​595)
  • Fixed a typo in the tutorial (#​614)
  • <TcpStream as Write>::poll_close now closes the write half of the stream (#​618)

v1.2.0

Compare Source

API Documentation

This patch includes some minor quality-of-life improvements, introduces a
new Stream::unzip API, and adds verbose errors to our networking types.

This means if you can't connect to a socket, you'll never have to wonder again
which address it was you couldn't connect to, instead of having to go through
the motions to debug what the address was.

Example

Unzip a stream of tuples into two collections:

use async_std::prelude::*;
use async_std::stream;

let s = stream::from_iter(vec![(1,2), (3,4)]);

let (left, right): (Vec<_>, Vec<_>) = s.unzip().await;

assert_eq!(left, [1, 3]);
assert_eq!(right, [2, 4]);

Added

  • Added Stream::unzip as "unstable".
  • Added verbose errors to the networking types.

Changed

  • Enabled CI.
  • Future::join and Future::try_join can now join futures with different
    output types.

Fixed

  • Fixed the docs and Debug output of BufWriter.
  • Fixed a bug in Stream::throttle that made it consume too much CPU.

v1.1.0

Compare Source

API Documentation

This patch introduces a faster scheduler algorithm, Stream::throttle, and
stabilizes task::yield_now. Additionally we're introducing several more stream
APIs, bringing us to almost complete parity with the standard library.

Furthermore our path submodule now returns more context in errors. So if
opening a file fails, async-std will tell you which file was failed to open,
making it easier to write and debug programs.

Examples

let start = Instant::now();

let mut s = stream::interval(Duration::from_millis(5))
    .throttle(Duration::from_millis(10))
    .take(2);

s.next().await;
assert!(start.elapsed().as_millis() >= 5);

s.next().await;
assert!(start.elapsed().as_millis() >= 15);

s.next().await;
assert!(start.elapsed().as_millis() >= 25);

Added

  • Added Stream::throttle as "unstable".
  • Added Stream::count as "unstable".
  • Added Stream::max as "unstable".
  • Added Stream::successors as "unstable".
  • Added Stream::by_ref as "unstable".
  • Added Stream::partition as "unstable".
  • Added contextual errors to the path submodule.
  • Added os::windows::symlink_dir as "unstable".
  • Added os::windows::symlink_file as "unstable".
  • Stabilized task::yield_now.

Fixes

  • We now ignore seek errors when rolling back failed read calls on File.
  • Fixed a bug where Stream::max_by_key was returning the wrong result.
  • Fixed a bug where Stream::min_by_key was returning the wrong result.

Changed

  • Applied various fixes to the tutorial.
  • Fixed an issue with Clippy.
  • Optimized an internal code generation macro, improving compilation speeds.
  • Removed an Unpin bound from stream::Once.
  • Removed various extra internal uses of pin_mut!.
  • Simplified Stream::any and Stream::all's internals.
  • The surf example is now enabled again.
  • Tweaked some streams internals.
  • Updated futures-timer to 2.0.0, improving compilation speed.
  • Upgraded async-macros to 2.0.0.
  • Stream::merge now uses randomized ordering to reduce overall latency.
  • The scheduler is now more efficient by keeping a slot for the next task to
    run. This is similar to Go's scheduler, and Tokio's scheduler.
  • Fixed the documentation of the channel types to link back to the channel
    function.

v1.0.1

Compare Source

API Documentation

We were seeing a regression in our fs performance, caused by too many
long-running tasks. This patch fixes that regression by being more proactive
about closing down idle threads.

Changes

  • Improved thread startup/shutdown algorithm in task::spawn_blocking.
  • Fixed a typo in the tutorial.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot changed the title fix(deps): update rust crate async-std to 1.12.0 fix(deps): update rust crate async-std to 1.12.0 - autoclosed May 5, 2024
@renovate renovate bot closed this May 5, 2024
@renovate renovate bot deleted the renovate/async-std-1.x branch May 5, 2024 10:29
@geofmureithi geofmureithi restored the renovate/async-std-1.x branch May 14, 2024 08:34
@geofmureithi geofmureithi reopened this May 14, 2024
@renovate renovate bot closed this May 14, 2024
@renovate renovate bot deleted the renovate/async-std-1.x branch May 14, 2024 08:35
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.

1 participant