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!: Move ConnectionId and PendingPoint to libp2p-swarm #3221

Closed

Conversation

umgefahren
Copy link
Contributor

@umgefahren umgefahren commented Dec 9, 2022

Description

Both of these are only needed as part of libp2p-swarm. Them residing in libp2p-core is a left-over from when libp2p-core still contained Pool.

Closes #3200.

Notes

As requested by @thomaseizinger I moved ConnectionId from core to swarm. I also changed every use of the struct from core to swarm.

I moved the ConnectionId struct and changed every relevant use. I also want to talk about the necessity of operator overloading.

Links to any relevant issues

Open Questions

None

Change checklist

  • I have performed a self-review of my own code
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Looks good to me, it's just missing the CHANGELOG.md entries and the Cargo.toml bumps

@thomaseizinger
Copy link
Contributor

Thanks @umgefahren !

This is a breaking change albeit a trivial one. I think we should hold off merging this until we merge something breaking that we definitely want.

For one, this is going to save trivial PRs like this one from making a lot of version bumps and changelog entries. Additionally, it allows us to accumulate features in master without breaking changes. Which is a good thing IMO.

Thoughts @libp2p/rust-libp2p-maintainers ?

@elenaf9
Copy link
Contributor

elenaf9 commented Dec 11, 2022

This is a breaking change albeit a trivial one. I think we should hold off merging this until we merge something breaking that we definitely want.

For one, this is going to save trivial PRs like this one from making a lot of version bumps and changelog entries. Additionally, it allows us to accumulate features in master without breaking changes. Which is a good thing IMO.

Thoughts @libp2p/rust-libp2p-maintainers ?

Don't have a strong opinion but sounds reasonable.
What do you think about adding a label for such low-priority-with-breaking-changes PRs, so that once we break master anyway we know what PRs can be merged?

@thomaseizinger
Copy link
Contributor

thomaseizinger commented Dec 11, 2022

This is a breaking change albeit a trivial one. I think we should hold off merging this until we merge something breaking that we definitely want.
For one, this is going to save trivial PRs like this one from making a lot of version bumps and changelog entries. Additionally, it allows us to accumulate features in master without breaking changes. Which is a good thing IMO.
Thoughts @libp2p/rust-libp2p-maintainers ?

Don't have a strong opinion but sounds reasonable. What do you think about adding a label for such low-priority-with-breaking-changes PRs, so that once we break master anyway we know what PRs can be merged?

Given that we know what the next version major will be, we could also create a milestone to plan it. That could also come in handy for deprecations that we've been making: We often open a PR already at the time of deprecating things where we remove the deprecated items. Those could also be added to such a milestone.

@mergify
Copy link

mergify bot commented Dec 12, 2022

This pull request has merge conflicts. Could you please resolve them @umgefahren? 🙏

@umgefahren
Copy link
Contributor Author

Looks good to me, it's just missing the CHANGELOG.md entries and the Cargo.toml bumps

Done! Why is the CI still failing? I thought that was fixed. We should really transition away from protoc...

@mergify
Copy link

mergify bot commented Dec 12, 2022

This pull request has merge conflicts. Could you please resolve them @umgefahren? 🙏

@mxinden
Copy link
Member

mxinden commented Dec 14, 2022

In case we merge #3196 and thus release a breaking change of libp2p-core, we can include this pull request as well.

@thomaseizinger
Copy link
Contributor

Looks good to me, it's just missing the CHANGELOG.md entries and the Cargo.toml bumps

Done! Why is the CI still failing? I thought that was fixed. We should really transition away from protoc...

It is being worked on :)

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Please also move PendingPoint as part of this and make it pub(crate).

@mxinden
Copy link
Member

mxinden commented Dec 20, 2022

#3196 is merged, thus we can easily include it in the next release cycle if you like @umgefahren.

@umgefahren
Copy link
Contributor Author

umgefahren commented Dec 20, 2022

#3196 is merged, thus we can easily include it in the next release cycle if you like @umgefahren.

Sounds good to me. I have to resolve the merge conflicts first

@thomaseizinger
Copy link
Contributor

thomaseizinger commented Jan 16, 2023

Friendly ping @umgefahren. I want this for #3254, let me know if you are still working on this, otherwise I'll push it forward!

@umgefahren
Copy link
Contributor Author

Please go ahead. I’m still preparing for exams

@thomaseizinger thomaseizinger changed the title refactor(core): Move ConnectionId refactor(core): Move ConnectionId and PendingPoint to libp2p-swarm Jan 17, 2023
@thomaseizinger thomaseizinger changed the title refactor(core): Move ConnectionId and PendingPoint to libp2p-swarm refactor!: Move ConnectionId and PendingPoint to libp2p-swarm Jan 17, 2023
@thomaseizinger thomaseizinger changed the base branch from master to no-run-title-as-command January 17, 2023 03:58
@thomaseizinger thomaseizinger marked this pull request as draft January 17, 2023 03:58
@thomaseizinger
Copy link
Contributor

Targeting #3318 to have CI green. Moved to draft until #3318 is merged.

This belongs into `libp2p-core`.
@mergify mergify bot deleted the branch libp2p:no-run-title-as-command January 17, 2023 22:13
@mergify mergify bot closed this Jan 17, 2023
@thomaseizinger
Copy link
Contributor

Ah damn mergify, can't stack PRs from forks ...

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.

refactor: Move ConnectionId from libp2p-core to libp2p-swarm
5 participants