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(kad): rename to follow naming convention across repository #4547

Merged
merged 22 commits into from
Sep 27, 2023

Conversation

PanGan21
Copy link
Contributor

@PanGan21 PanGan21 commented Sep 24, 2023

Description

Renamed the following

kad::Kademlia -> kad::Behaviour
kad::KademliaEvent -> kad::Event
kad::KademliaBucketInserts -> kad::BucketInserts
kad::KademliaStoreInserts -> kad::StoreInserts
kad::KademliaConfig -> kad::Config
kad::KademliaCaching -> kad::Caching
kad::KademliaEvent -> kad::Event
kad::KademliaConnectionType -> kad::ConnectionType
KademliaHandler -> Handler
KademliaHandlerEvent -> HandlerEvent
KademliaProtocolConfig -> ProtocolConfig
KademliaHandlerIn -> HandlerIn
KademliaRequestId -> RequestId
KademliaHandlerQueryErr -> HandlerQueryErr

Resolves: #4485

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@PanGan21
Copy link
Contributor Author

I am wondering if non exported variable names from other files like KademliaHandler should also be renamed or it is just client faced change?

@thomaseizinger
Copy link
Contributor

I am wondering if non exported variable names from other files like KademliaHandler should also be renamed or it is just client faced change?

We should rename the internal ones too but we don't have to add type-aliases for those :)

@thomaseizinger
Copy link
Contributor

Have a look at the CI failures. I think the type-aliases will have to go to the top-level module to be publicly visible :)

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.

This is great, thank you! To finish this off, can you please:

  • Bump the patch version in protocols/kad/Cargo.toml
  • Make the same bump in [workspace.dependencies] in Cargo.toml
  • Write a changelog entry in protocols/kad/CHANGELOG.md

@PanGan21
Copy link
Contributor Author

This is great, thank you! To finish this off, can you please:

  • Bump the patch version in protocols/kad/Cargo.toml
  • Make the same bump in [workspace.dependencies] in Cargo.toml
  • Write a changelog entry in protocols/kad/CHANGELOG.md

Done! Thanks for the guidance!
I started reading/learning about Kademlia while doing this pr so I will look for related issues :)

@PanGan21 PanGan21 marked this pull request as ready for review September 26, 2023 18:18
thomaseizinger
thomaseizinger previously approved these changes Sep 26, 2023
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.

Thanks!

protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
@mergify mergify bot dismissed thomaseizinger’s stale review September 26, 2023 23:16

Approvals have been dismissed because the PR was updated after the send-it label was applied.

@mergify
Copy link
Contributor

mergify bot commented Sep 27, 2023

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

@mergify mergify bot merged commit c8b5f49 into libp2p:master Sep 27, 2023
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kad: rename to follow naming convention across repository
2 participants