Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 10, 2025

Updates the requirements on bincode to permit the latest version.

Release notes

Sourced from bincode's releases.

v2.0.0

Stable! Finally! After 4 years in development! Many changes have made it in since rc.3, including (unfortunately) some last minute breaking changes. But documentation has been cleaned up to a point where we finally feel comfortable committing to things as they are.

If you haven't been following along with the 2.0 changes here is a brief overview

  • Completely rewritten API decoupled from serde
  • no_std support
  • Official format specification
  • Default configuration changes
  • Increase MSRV to 1.85.0

What's Changed since 1.3.1

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [bincode](https://github.com/bincode-org/bincode) to permit the latest version.
- [Release notes](https://github.com/bincode-org/bincode/releases)
- [Commits](bincode-org/bincode@v1.0.0...v2.0.0)

---
updated-dependencies:
- dependency-name: bincode
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Mar 10, 2025
@al8n al8n merged commit a28ded8 into main Jul 1, 2025
13 of 14 checks passed
@dependabot dependabot bot deleted the dependabot/cargo/bincode-2 branch July 1, 2025 02:49
imlk0 added a commit to inclavare-containers/serf that referenced this pull request Dec 2, 2025
The example `toyconsul` fails to compile due to the use of deprecated
`bincode::serialize` and `bincode::deserialize` when upgrading to
bincode 2.x with the `serde` feature enabled.

This commit:
- Updates `Cargo.toml` to enable the `serde` feature for bincode.
- Replaces deprecated `serialize`/`deserialize` calls with the new
  `bincode::serde::encode_to_vec` and `decode_from_slice` APIs.
- Adjusts result handling to account for the tuple return `(T, usize)`
  from `decode_from_slice`.

Fixes build breakage introduced by al8n#33.

Signed-off-by: Kun Lai <[email protected]>
al8n pushed a commit that referenced this pull request Dec 2, 2025
* fix: remove unused variable `encoded_len` warning when metrics feature is disabled

Signed-off-by: Kun Lai <[email protected]>

* fix(toyconsul): fix compilation error after bincode update in #33

The example `toyconsul` fails to compile due to the use of deprecated
`bincode::serialize` and `bincode::deserialize` when upgrading to
bincode 2.x with the `serde` feature enabled.

This commit:
- Updates `Cargo.toml` to enable the `serde` feature for bincode.
- Replaces deprecated `serialize`/`deserialize` calls with the new
  `bincode::serde::encode_to_vec` and `decode_from_slice` APIs.
- Adjusts result handling to account for the tuple return `(T, usize)`
  from `decode_from_slice`.

Fixes build breakage introduced by #33.

Signed-off-by: Kun Lai <[email protected]>

* fix(toyconsul): fix 100% CPU spin on Ctrl+C by handling closed event channel

Gracefully break event loop when serf event channel is closed during shutdown,
preventing busy-loop caused by ignored recv() errors.

Signed-off-by: Kun Lai <[email protected]>

* fix: suppress unused variable warning for `msg` in delegate.rs

Move the loop inside `#[cfg(feature = "metrics")]` block and rename `msg` to `_msg`
to explicitly indicate it's intentionally unused when metrics are disabled.

Signed-off-by: Kun Lai <[email protected]>

* fix: break cycle between SerfDelegate and KeyManager using weak references

Previously, a reference cycle existed:
- `Serf` → strongly owns → `SerfDelegate` and `KeyManager`
- `SerfDelegate` and `KeyManager` → each hold a strong `OnceLock<Serf<T, D>>` → back to `Serf`

Which prevented `Drop` from running and caused memory leaks.

This commit:
- Introduces `SerfWeakRef<T, D>` to allow holding a weak reference to `Serf`.
- Changes `OnceLock<Serf<T, D>>` in delegate and key manager to `OnceLock<SerfWeakRef<T, D>>`.
- Uses `downgrade()` when storing the serf instance during initialization.
- Safely upgrades to strong reference only when needed, and handles `None` gracefully.

Now the object graph can be properly dropped on shutdown, fixing memory leaks and ensuring `Drop` hooks run.

Signed-off-by: Kun Lai <[email protected]>

---------

Signed-off-by: Kun Lai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants