Update dependencies including breaking changes#1175
Conversation
Semver-compatible updates: - Rust: 23 crate updates (hyper, mio, uuid, wasm-bindgen, etc.) - JS: @biomejs/biome 2.4.3→2.4.10, publint 0.3.17→0.3.18 Breaking updates: - m3u8-rs 5→6: target_duration changed from f32 to u64 (per RFC 8216) - sd-notify 0.4→0.5: removed unset_env parameter from notify() - web-transport-iroh 0.2→0.3: updated to iroh 0.97 (builder now requires preset) - web-transport-proto 0.5→0.6: added headers field to ConnectRequest Also exposes --iroh-disable-relay flag to allow P2P-only iroh connections without relay traffic forwarding, using iroh's N0DisableRelay preset. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR updates workspace and package dependency versions: 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rs/moq-relay/src/main.rs`:
- Line 49: Replace the ignored call to
sd_notify::notify(&[sd_notify::NotifyState::Ready]) with error-aware handling:
capture the Result from sd_notify::notify, and on Err log the error and
contextual message (e.g., via log::error! or eprintln!) including the returned
std::io::Error and that NotifyState::Ready failed, but do not panic—allow the
process to continue; ensure you still call sd_notify::notify with
sd_notify::NotifyState::Ready on success.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 209c88e8-caf6-4e39-8b23-de1f1136df72
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.lockbun.lockis excluded by!**/*.lockuv.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
Cargo.tomlpackage.jsonrs/moq-cli/Cargo.tomlrs/moq-cli/src/client.rsrs/moq-cli/src/server.rsrs/moq-mux/Cargo.tomlrs/moq-mux/src/import/hls.rsrs/moq-native/src/iroh.rsrs/moq-relay/Cargo.tomlrs/moq-relay/src/main.rs
| #[cfg(unix)] | ||
| // Notify systemd that we're ready after all initialization is complete | ||
| let _ = sd_notify::notify(true, &[sd_notify::NotifyState::Ready]); | ||
| let _ = sd_notify::notify(&[sd_notify::NotifyState::Ready]); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd rs/moq-relay && head -n 60 src/main.rs | tail -n 20Repository: moq-dev/moq
Length of output: 671
🏁 Script executed:
cd rs/moq-relay && wc -l src/main.rsRepository: moq-dev/moq
Length of output: 69
🏁 Script executed:
cd rs/moq-relay && sed -n '40,60p' src/main.rsRepository: moq-dev/moq
Length of output: 703
🏁 Script executed:
# Search for sd_notify usage patterns in the codebase
rg 'sd_notify' --type rs -B 2 -A 2Repository: moq-dev/moq
Length of output: 81
🏁 Script executed:
# Check the Cargo.toml to understand sd_notify version and return type
rg 'sd_notify' rs/moq-relay/Cargo.tomlRepository: moq-dev/moq
Length of output: 37
🏁 Script executed:
# Search without the --type flag (which failed)
rg 'sd_notify' -B 2 -A 2Repository: moq-dev/moq
Length of output: 871
🏁 Script executed:
# Find and check Cargo.toml files
find . -name "Cargo.toml" | head -5 | xargs grep -l 'sd_notify'Repository: moq-dev/moq
Length of output: 39
🏁 Script executed:
# Look at the Cargo.toml to see sd_notify version
cat rs/moq-relay/Cargo.toml | grep -A 5 -B 5 'sd_notify'Repository: moq-dev/moq
Length of output: 37
🏁 Script executed:
# Check if there are any other error handling patterns for similar operations
rg 'sd_notify|tracing::warn' rs/moq-relay/src/main.rs -B 2 -A 2Repository: moq-dev/moq
Length of output: 351
🏁 Script executed:
# Look for sd_notify in Cargo.lock or check dependencies
rg 'sd_notify' Cargo.lock --max-count=5Repository: moq-dev/moq
Length of output: 37
🏁 Script executed:
# Search for any error handling or documentation about sd_notify
rg 'sd_notify' --max-count=10 -A 5 -B 5Repository: moq-dev/moq
Length of output: 1997
🏁 Script executed:
# Check if there's any configuration or setup guide that mentions sd_notify
find . -name "*.md" -o -name "*.txt" | xargs grep -l "sd_notify" 2>/dev/null | head -5Repository: moq-dev/moq
Length of output: 37
🏁 Script executed:
# Look for the sd_notify crate documentation in comments or code
rg 'sd_notify::' -A 3 -B 3 | head -50Repository: moq-dev/moq
Length of output: 1161
🌐 Web query:
sd_notify rust crate return type Result error handling
💡 Result:
The sd-notify Rust crate (latest version 0.5.0 as of 2026-03-09) provides functions like sd_notify::notify for sending systemd notifications. The main notify function returns Result<, E> where E is typically std::io::Error from Unix socket operations. Examples in official docs show let _ = sd_notify::notify(&[NotifyState::Ready]); intentionally ignoring the Result, but proper error handling uses match or ? operator. For error handling: - Use match to handle Ok/Err: match sd_notify::notify(&[NotifyState::Ready]) { Ok() => println!("Notified"), Err(e) => eprintln!("Notification failed: {}", e), } - Or propagate with ?: fn notify_ready -> Result<, std::io::Error> { sd_notify::notify(&[NotifyState::Ready])? ; Ok() } Note: There is a different crate sdnotify with explicit Error enum, but sd-notify (most popular, 9M+ downloads) uses Result. Some functions like NotifyState::monotonic_usec_now explicitly return Result. Always check return value as socket send can fail (e.g., no NOTIFY_SOCKET env, connection issues).
Citations:
- 1: https://docs.rs/sd-notify/latest/sd_notify/
- 2: https://docs.rs/sd-notify
- 3: https://crates.io/crates/sd-notify
- 4: https://docs.rs/sd-notify/latest/sd_notify/enum.NotifyState.html
- 5: https://pages.pvv.ntnu.no/Projects/muscl/main/docs/sd_notify/fn.notify.html
- 6: https://github.com/lnicola/sd-notify
Handle notify errors instead of swallowing them.
The sd_notify::notify() function returns Result<(), std::io::Error> and can fail due to socket issues (e.g., missing NOTIFY_SOCKET environment variable, connection problems). Ignoring these errors makes operational debugging harder. Log the failure to provide visibility without crashing the application.
Suggested patch
- let _ = sd_notify::notify(&[sd_notify::NotifyState::Ready]);
+ if let Err(err) = sd_notify::notify(&[sd_notify::NotifyState::Ready]) {
+ tracing::warn!(%err, "failed to notify systemd readiness");
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let _ = sd_notify::notify(&[sd_notify::NotifyState::Ready]); | |
| if let Err(err) = sd_notify::notify(&[sd_notify::NotifyState::Ready]) { | |
| tracing::warn!(%err, "failed to notify systemd readiness"); | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@rs/moq-relay/src/main.rs` at line 49, Replace the ignored call to
sd_notify::notify(&[sd_notify::NotifyState::Ready]) with error-aware handling:
capture the Result from sd_notify::notify, and on Err log the error and
contextual message (e.g., via log::error! or eprintln!) including the returned
std::io::Error and that NotifyState::Ready failed, but do not panic—allow the
process to continue; ensure you still call sd_notify::notify with
sd_notify::NotifyState::Ready on success.
Summary
target_durationchanged fromf32tou64per RFC 8216unset_envparameter fromnotify()headersfield toConnectRequest--iroh-disable-relayflag to allow P2P-only iroh connections without relay forwarding (usesN0DisableRelaypreset which keeps DNS/pkarr discovery but disables the relay)Test plan
just checkpasses (all builds, tests, linting, docs, nix)--iroh-disable-relay🤖 Generated with Claude Code