Observed behaviour
Fluxer's Rust services use rust:1-trixie, which currently floats to version 1.99.
During builds of binaries for Fluxer's services, warnings appear indicating the use of method fetch_update is deprecated. This method has been superseded by try_update and officially deprecated in 1.99.
Three services, in six locations, currently use
fetch_update(): users, gifs, and media-proxy. Per the deprecation warning, these uses should be changed to try_update().Reproduction steps
- Check out the repo at latest (currently commit ec681e6)
- Ensure presence of Rust 1.99 toolchain, per rust:1-trixie
- Build the users and gifs services with
cargo build -p fluxer-users -p fluxer-gifs - Observe deprecation warnings during build.
fetch_update)Evidence
(example from fluxer_users)
(locating
warning: use of deprecated method `std::sync::atomic::Atomic::<u64>::fetch_update`: renamed to `try_update` for consistency
--> fluxer_users/src/shard_impl.rs:390:14
|
390 | .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |current| {
| ^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
help: replace the use of the deprecated method
|
390 - .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |current| {
390 + .try_update(Ordering::SeqCst, Ordering::SeqCst, |current| {
|
fetch_update use)
$ git grep -n 'fetch_update('
fluxer_gifs/src/shard_impl.rs:178: .fetch_update(METRICS_ORDERING, METRICS_ORDERING, |generation| {
fluxer_media_proxy/src/byte_budget.rs:46: .fetch_update(Ordering::AcqRel, Ordering::Acquire, |used| {
fluxer_media_proxy/src/server/middleware.rs:66: .fetch_update(Ordering::AcqRel, Ordering::Acquire, |active| {
fluxer_media_proxy/src/server/native_task_executor.rs:218: .fetch_update(Ordering::AcqRel, Ordering::Acquire, |active| {
fluxer_media_proxy/src/storage/source_read.rs:83: .fetch_update(Ordering::AcqRel, Ordering::Acquire, |active| {
fluxer_users/src/shard_impl.rs:390: .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |current| {