Skip to content

Remove portpicker dependency, use direct port binding#405

Open
mvanhorn wants to merge 1 commit intoget-convex:mainfrom
mvanhorn:osc/72-remove-portpicker-dependency
Open

Remove portpicker dependency, use direct port binding#405
mvanhorn wants to merge 1 commit intoget-convex:mainfrom
mvanhorn:osc/72-remove-portpicker-dependency

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

Relates to #72

Removes the portpicker crate dependency entirely by replacing its last usage with TcpListener::bind("127.0.0.1:0") - the same pattern already used in crates/node_executor/src/local.rs.

Changes

  • crates/local_backend/src/subs/mod.rs: Replace portpicker::pick_unused_port() with TcpListener::bind("127.0.0.1:0") to get an OS-assigned port
  • Cargo.toml: Remove portpicker = "0.1" from workspace dependencies
  • crates/local_backend/Cargo.toml: Remove portpicker dependency
  • crates/application/Cargo.toml: Remove unused portpicker dependency

Why

The portpicker crate is unmaintained (last updated 4+ years ago) and fails on servers without IPv6 support, causing the "No ports free" crash reported in #72. The production crash path in local.rs was already fixed to use direct port binding - this PR completes the cleanup by removing the last usage and the dependency itself.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This contribution was developed with AI assistance (Claude Code).

Replace the last remaining portpicker usage in subs/mod.rs with
TcpListener::bind("127.0.0.1:0"), matching the pattern already
used in node_executor/src/local.rs. Remove the portpicker dependency
from workspace, local_backend, and application Cargo.toml files.

portpicker is unmaintained (last updated 4 years ago) and fails on
servers without IPv6 support.

Relates to get-convex#72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant