Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Oct 30, 2025

Description

Note: Before next release the iroh-metrics dep of portmapper should be bumped to iroh-metrics 0.37 after n0-computer/iroh-metrics#56 is merged & released

Migrates the repo from snafu/n0-snafu to n0-error.

Note: This PR is mostly AI generated after a detailed instruction set on how to do the migration.
I gave the diff a line-by-line review and fixed things up where the AI made mistakes.
Afterwards, I gave the diff another review while adding a few more from_sources and removing manual error mappings.

Breaking Changes

  • All error structs and enum variants now have a meta: n0_error::Meta field
  • All backtrace fields are removed on error enums and structs

Notes & open questions

Change checklist

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

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/net-tools/pr/59/docs/net_tools/

Last updated: 2025-10-31T13:16:46Z

@n0bot n0bot bot added this to iroh Oct 31, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 31, 2025
@Frando Frando changed the title refactor: migrate from snafu/n0-snafu to n0-error refactor!: migrate from snafu/n0-snafu to n0-error Oct 31, 2025
@Frando Frando marked this pull request as ready for review October 31, 2025 13:11
))]
MessageType::Route => {
snafu::ensure!(data.len() >= self.body_off, MessageTooShortSnafu);
n0_error::ensure!(data.len() >= self.body_off, RouteError::MessageTooShort);
Copy link
Contributor

Choose a reason for hiding this comment

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

lets clean this up and actually import ensure

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

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants