Open
Conversation
We now use `std::sync::OnceLock`, which has been stabilized in 1.70.
25afebf to
48a0ee3
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates multiple dependencies across the workspace to their latest versions and replaces the external once_cell crate with the standard library's OnceLock. It also adds the Zlib license to deny.toml (needed by the new foldhash transitive dependency) and adapts metrics macro calls to align with the updated metrics crate API.
Changes:
- Bumped major and minor versions of workspace and crate-level dependencies (e.g.,
axum0.7→0.8,thiserror1→2,metrics0.22→0.24,diesel2.1→2.3, etc.) - Replaced
once_cell::sync::OnceCellwithstd::sync::OnceLockinhdrop-shared/src/env.rs, removing theonce_celldirect dependency - Updated
metrics::gauge!/histogram!/counter!calls to discard return values with_ =, matching the new macro signatures
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Bumped workspace deps: thiserror 2, uuid 1.22, metrics 0.24 |
| hdrop-db/Cargo.toml | Bumped diesel 2.3, deadpool-diesel 0.6.1, deadpool 0.12.3 |
| hdrop-server/Cargo.toml | Bumped axum 0.8, axum-extra 0.12, tower-http 0.6, metrics-exporter-prometheus 0.18, etc. |
| hdrop-shared/Cargo.toml | Removed once_cell dependency |
| hdrop-shared/src/env.rs | Migrated from OnceCell to OnceLock |
| hdrop-server/src/server/prometheus_metrics_server.rs | Discarded return values of metrics macros |
| deny.toml | Added Zlib license for foldhash dependency |
| Cargo.lock | Updated lockfile to reflect all dependency changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily updates dependencies across the workspace to newer versions and refactors the environment variable cache implementation to use the standard library. The changes improve compatibility, security, and maintainability by aligning with the latest releases and removing an external dependency.
Dependency updates:
thiserror,uuid, andmetricsinCargo.toml, to their latest major versions for improved compatibility and security.hdrop-db/Cargo.toml, such asdiesel,deadpool-diesel, anddeadpool, to newer versions for better performance and bug fixes.hdrop-server/Cargo.toml, includingaxum,axum-extra,regex,tower-http,metrics-exporter-prometheus, andtracinglibraries, to their latest versions for enhanced features and stability. [1] [2]Codebase refactoring:
once_cellcrate with the standard library'sOnceLockinhdrop-shared/src/env.rs, simplifying dependency management and leveraging the standard library. [1] [2] [3]hdrop-server/src/server/prometheus_metrics_server.rsto ignore the return values of metric macros, aligning with updated macro signatures in the latestmetricscrate.