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

Full rewrite #64

Merged
merged 27 commits into from
Oct 20, 2023
Merged

Full rewrite #64

merged 27 commits into from
Oct 20, 2023

Conversation

Finomnis
Copy link
Owner

@Finomnis Finomnis commented Oct 12, 2023

Full rewrite of this crate

The main problem was that the API followed the implementation and not the other way round. Some API improvements weren't possible because they weren't implementable.

With the new implementation, several API decisions that bothered me were finally improved.

Breaking Changes

  • Remove Toplevel::nested (which was a rather ugly hack), replace with configurable ErrorActions.
  • Remove partial shutdown mechanism; replace with NestedSubsystem::initiate_shutdown() and NestedSubsystem::join().
  • Add SubsystemHandle::wait_for_children().
  • Remove Toplevel::start. Instead, add a single subsystem to Toplevel::new, which can then spawn all further subsystems.
  • Rework SubsystemHandle::start; it now takes a SubsystemBuilder object that provides further subsystem configuration options.
  • Minimum Supported Rust Version (MSRV) is now 1.63.0.

The rest of the API is almost identical and migration should be mostly straight forward.

@Finomnis Finomnis changed the title Fullrewrite Full rewrite Oct 12, 2023
src/subsystem/subsystem_builder.rs Fixed Show fixed Hide fixed
src/subsystem/subsystem_builder.rs Fixed Show fixed Hide fixed
tests/integration_test.rs Fixed Show fixed Hide fixed
src/error_action.rs Fixed Show fixed Hide fixed
@Finomnis Finomnis marked this pull request as ready for review October 19, 2023 19:04
@Finomnis Finomnis merged commit 926d497 into main Oct 20, 2023
13 of 14 checks passed
@Finomnis Finomnis deleted the rewrite branch October 20, 2023 11:37
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.

None yet

1 participant