Skip to content

deps: Disable dependency default-features by default; upgrade dependencies to latest#454

Open
bryantbiggs wants to merge 5 commits intocontainerd:mainfrom
bryantbiggs:deps/upgrade-cleanup
Open

deps: Disable dependency default-features by default; upgrade dependencies to latest#454
bryantbiggs wants to merge 5 commits intocontainerd:mainfrom
bryantbiggs:deps/upgrade-cleanup

Conversation

@bryantbiggs
Copy link
Contributor

@bryantbiggs bryantbiggs commented Feb 18, 2026

  • Disable dependency default features with default-features = false, forcing explicit feature opt-in to ensure only the necessary dependencies are pulled in. Dependencies were updated to the latest during this change
  • Replace 3rd party crates with native std library functionality; fewer dependencies to update and maintain

Summary:

- 263 total dependencies on main → 251 on this branch                                                                                                                                                                                                                                                                   
- Net reduction: 12 dependencies (14 removed, 2 added)
                                                                                                                                                                                                                                                                                                                        
Removed crates:                                                                                                                                                                                                                                                                                                         
- lazy_static → replaced by std::sync::LazyLock
- os_pipe → replaced by std::io::pipe()
- page_size → replaced by direct libc::sysconf call
- prctl → replaced by direct libc::prctl call
- path-absolutize / path-dedot → replaced by std::path::absolute()
- parking_lot / parking_lot_core / lock_api / scopeguard / redox_syscall → transitive deps of parking_lot, no longer needed
- pulldown-cmark / pulldown-cmark-to-cmark / unicase → transitive deps dropped

However, this isn't the complete picture. Per crate, it will vary based on what is removed due to scoping the features used by each crate.

Fixes pre-existing correctness and hygiene issues discovered during the dependency cleanup work.

Let me know if this commit needs to move to a separate PR:

  • Add error handling for sysconf(_SC_PAGESIZE). The raw sysconf result was cast directly to usize, silently producing usize::MAX on error and causing incorrect page size checks for overlay mount compaction.
  • Fix double-close in PipedIo::close_after_start. close_after_start() closed a raw fd while the owning type still held it, leading to a double-close on drop. If the fd number was reused between the two closes, this could silently close an unrelated fd belonging to another part of the process.
  • Fix unused variable in prefix_filter. Dead if-let binding replaced with a simpler starts_with() check.
  • Simplify async Pipe to use std::io::pipe(). The async pipe unnecessarily went through tokio::net::unix::pipe and then converted back to blocking fds. Now uses std::io::pipe() directly, consistent with the sync pipe.
  • Remove blanket #![allow(unused)] from mount_linux.rs. The file-level suppression hid real warnings. Replaced with targeted cfg gates on feature-specific imports and a scoped allow on MountInfo whose fields are populated during parsing for completeness.
  • Also fixed a couple minor unused variable/assignment warnings that surfaced.

@github-actions github-actions bot added C-runc-shim Runc shim C-shim-protos Shim protos C-shim Containerd shim C-client Containerd client C-snapshots Remote snapshotter C-runc runc helper T-CI Changes in project's CI labels Feb 18, 2026
@bryantbiggs bryantbiggs changed the title deps: Disable dependency default-features by default; upgrade depen…or deps: Disable dependency default-features by default; upgrade dependencies to latest Feb 18, 2026
@bryantbiggs
Copy link
Contributor Author

cc @mxpv if you have some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-client Containerd client C-runc runc helper C-runc-shim Runc shim C-shim Containerd shim C-shim-protos Shim protos C-snapshots Remote snapshotter T-CI Changes in project's CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

containerd_client pulls in server side of tonic

1 participant

Comments