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

fix(kad): remove default IPFS protocol name #5122

Merged
merged 9 commits into from
Feb 19, 2024
Merged

Conversation

guillaumemichel
Copy link
Contributor

@guillaumemichel guillaumemichel commented Jan 24, 2024

Description

Fixes: #5006.
Related: #5015.

Notes & open questions

Following suggestions from #5015 (comment)

  • NOT removing the Default trait for kad::Config and kad::ProtocolConfig, but documenting it as deprecated.
  • Adding new constructors kad::Config::new(Vec<StreamProtocol>) and kad::ProtocolConfig::new(Vec<StreamProtocol>) to be used instead of kad::Config::default() and kad::ProtocolConfig::default().
  • Adding a manual deprecated kad::Config::default() and kad::ProtocolConfig::default(), to prevent users from calling default().
  • Deprecating kad::Config::set_protocol_names and kad::ProtocolConfig::set_protocol_names, they should be replaced by kad::Config::new(Vec<StreamProtocol>) and kad::ProtocolConfig::new(Vec<StreamProtocol>).
  • Updating code calling deprecated functions.
  • This change is expected to be backward compatible.

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

Copy link
Contributor

mergify bot commented Jan 25, 2024

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

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.

Nice work! Just two comments :)

protocols/kad/Cargo.toml Outdated Show resolved Hide resolved
protocols/kad/src/behaviour.rs Outdated Show resolved Hide resolved
thomaseizinger
thomaseizinger previously approved these changes Feb 14, 2024
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.

LGTM, thank you!

misc/server/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
@mergify mergify bot dismissed thomaseizinger’s stale review February 14, 2024 08:02

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

thomaseizinger
thomaseizinger previously approved these changes Feb 14, 2024
@mergify mergify bot dismissed thomaseizinger’s stale review February 19, 2024 06:09

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

@mergify mergify bot merged commit ea9b239 into master Feb 19, 2024
71 of 73 checks passed
@mergify mergify bot deleted the fix/kad-proto-name branch February 19, 2024 06:19
guillaumemichel added a commit that referenced this pull request Mar 28, 2024
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: remove default IPFS DHT protocol name
3 participants