Skip to content

Conversation

@matheus23
Copy link
Member

@matheus23 matheus23 commented Jul 25, 2025

Description

Updates the n0-watcher dependency to the new version (that has a lot fewer Results everywhere).

Breaking Changes

  • Updated n0-watcher from version 0.2 to 0.3.
    Migration guide for users:
    • endpoint.node_addr().initialized().await? -> endpoint.node_addr().initialized().await (no ? needed anymore) and similarly for endpoint.home_relay() and other uses of Watchers.
    • endpoint.node_addr().get()? -> endpoint.node_addr().get() and similarly for endpoint.home_relay() and other uses of Watchers.
    • If all you have is a &impl Watcher but you need the current value, then you can't call Watcher::get anymore, as that now takes a &mut self instead of &self. You can work around this by .clone()ing to an intermediate watcher:
      watcher_ref.get() -> watcher_ref.clone().get()

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • All breaking changes documented.

@matheus23 matheus23 self-assigned this Jul 25, 2025
@github-actions
Copy link

github-actions bot commented Jul 25, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3405/docs/iroh/

Last updated: 2025-07-28T18:01:19Z

@n0bot n0bot bot added this to iroh Jul 25, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Jul 25, 2025
@github-actions
Copy link

github-actions bot commented Jul 28, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: d98dc64

@matheus23 matheus23 force-pushed the matheus23/update-n0-watcher branch from 98528a7 to ebfb043 Compare July 28, 2025 16:08
@matheus23 matheus23 marked this pull request as ready for review July 28, 2025 16:09
Copy link
Member

@Frando Frando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff looks good, nice to see this simplification. Migration guide also read very good and didn't spot anything missing.

I had a quick thought if we could have the Watcher be a future so that you could skip the .initialized but don't think this is possible due to same-crate rules for trait impls on generics. Well, people will get used to the .initialized.

@matheus23 matheus23 added this pull request to the merge queue Jul 28, 2025
Merged via the queue into main with commit 2ce6a73 Jul 28, 2025
29 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Jul 28, 2025
@ramfox ramfox deleted the matheus23/update-n0-watcher branch July 28, 2025 19:33
@matheus23 matheus23 mentioned this pull request Jul 28, 2025
1 task
github-merge-queue bot pushed a commit that referenced this pull request Jul 29, 2025
## Description

This avoids a double-dependency on n0-watcher versions 0.2 and 0.3. I
accidentally didn't push this to #3405

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants