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

refactor!: remove isStarted method from Startable #2145

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

achingbrain
Copy link
Member

Description

We have an isStarted method on the Startable interface but we only really use it in tests. Our implementations tend to guard on being started twice so it just adds noise to every implementation.

BREAKING CHANGE: the isStarted method has been removed from the Startable interface

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
@achingbrain
Copy link
Member Author

Draft because some tests are failing.

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

I don't see where the method is removed from the interface

@achingbrain
Copy link
Member Author

Looks like I didn't manage to push all the changes, oops. Should be ok now.

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

Does it need a migration note?

@achingbrain achingbrain marked this pull request as ready for review October 24, 2023 16:03
@achingbrain achingbrain requested a review from a team as a code owner October 24, 2023 16:03
@achingbrain
Copy link
Member Author

I don't think so because people by and large shouldn't be starting/stopping components behind libp2p's back?

@achingbrain achingbrain merged commit 9c9c184 into release-v1.0 Oct 25, 2023
17 checks passed
@achingbrain achingbrain deleted the refactor/remove-is-started-from-startable branch October 25, 2023 05:26
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Oct 31, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 3, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 7, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 8, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 8, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 8, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 8, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 10, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Nov 10, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
achingbrain added a commit that referenced this pull request Nov 15, 2023
We have an `isStarted` method on the `Startable` interface but we only
really use it in tests. Our implementations tend to guard on being
started twice so it just adds noise to every implementation.

BREAKING CHANGE: the `isStarted` method has been removed from the `Startable` interface
This was referenced Jan 18, 2024
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