Skip to content

Releases: Finomnis/tokio-graceful-shutdown

v0.8.0-beta.1

09 May 12:38
Compare
Choose a tag to compare
v0.8.0-beta.1 Pre-release
Pre-release

Fixes

  • Fix compatibility issue between IntoSubsystem and custom error types

v0.8.0-beta.0

07 May 18:11
Compare
Choose a tag to compare
v0.8.0-beta.0 Pre-release
Pre-release

Breaking Changes

  • Error type is now configurable via generic
    • Enables custom error types for projects that are then recoverable from GracefulShutdownError in their original type
    • For more infos, see example 18_error_type_passthrough

v0.7.0

06 May 16:34
Compare
Choose a tag to compare

Breaking Changes

  • Rewrite Errors
    • Errors can now be prettified with miette
    • Errors now carry the error sources including the actual errors from the failed subsystems
  • Display a warning if the Toplevel object isn't consumed (via handle_shutdown_requests)
  • Cancel all subsystems connected to the Toplevel object when the Toplevel object is dropped

Non-breaking changes

  • Change recommended error wrapper library from anyhow to miette.
    • Compatibility to other error handling wrapper libraries stays unchanged.
  • Add IntoSubsystem trait to make writing struct-based subsystems more convenient

v0.6.0

20 Apr 20:43
Compare
Choose a tag to compare

Breaking Changes

  • Subsystems can return Err<Into<Box<dyn Error + Send + Sync>>> instead of Err<Into<anyhow::Error>>
    • Allows all error types that can be converted to Box<dyn Error + Send + Sync>
    • Should be compatible with existing code, but increases compatibility with new error handling crates
  • Toplevel::handle_shutdown_requests can now return all types that implement From<GracefulShutdownError>, which should integrate seamlessly with most return types from main(), like anyhow::Result, Box<dyn Error> or eyre::Result

v0.6.0-beta.0

20 Apr 07:51
Compare
Choose a tag to compare
v0.6.0-beta.0 Pre-release
Pre-release

Breaking Changes

  • Subsystems can return Err<Into<Box<dyn Error + Send + Sync>>> instead of Err<Into<anyhow::Error>>
    • Allows all error types that can be converted to Box<dyn Error + Send + Sync>
    • Should be compatible with existing code, but increases compatibility with new error handling crates
  • Toplevel::handle_shutdown_requests can now return all types that implement From<GracefulShutdownError>, which should integrate seamlessly with most return types from main(), like anyhow::Result, Box<dyn Error> or eyre::Result

v0.5.0

15 Mar 18:46
Compare
Choose a tag to compare

Breaking Changes

  • Subsystems can return Err<Into<anyhow::Error>> instead of Err<anyhow::Error>
    • No longer imposes the anyhow dependency on library users
    • Should not be a problem in most cases, but closures only returning Ok(()) will now fail to compile, as Rust is unable to deduce the Error type

v0.4.4

13 Mar 14:20
Compare
Choose a tag to compare

Changes

  • Make SubsystemHandle::start() a non-mut function (@Trivernis)
    • This removes the necessity of the handle argument to be mut, making it much easiert to pass it around, to store it in structs and to use it as a shared reference.

v0.4.3

05 Dec 16:35
7714f3a
Compare
Choose a tag to compare

Changes

  • Fix: Errors during partial shutdown no longer cause global shutdown.
    • Instead, errors get properly delivered to the task that issued the partial shutdown.

v0.4.2

05 Dec 08:26
3439479
Compare
Choose a tag to compare

Changes

  • Reduce Rust version to 2018
    • Adds compatibility with Rust 2018 projects

v0.4.1

28 Nov 20:35
efab9f4
Compare
Choose a tag to compare

Breaking Changes

  • Rename Toplevel::wait_for_shutdown to Toplevel::handle_shutdown_requests to make it clearer what the purpose of this function is
  • Implement partial shutdown API
    • Change return value of SubsystemHandle::create() to NestedSubsystem
    • Add SubsystemHandle::perform_partial_shutdown(NestedSubsystem)
    • Add NestedSubsystem struct and PartialShutdownError enum