Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 24, 2025

Bumps human-errors from 0.1.5 to 0.2.2.

Release notes

Sourced from human-errors's releases.

Version 0.2.2

What's Changed

This release adds support for the new pretty feature, which enables you to render a lovely human-readable version of the error for your users.

eprintln!("{}", human_errors::pretty(&your_error));

Full Changelog: SierraSoftworks/human-errors-rs@v0.2.1...v0.2.2

Version 0.2.1

Changes

  • Improved handling for advice (ensuring that only non-duplicate entries are shown).
  • Improved Debug representation for wrapped errors (using a more descriptive struct name).

Version 0.2.0

⚠️ This is a major breaking change which will require you to rewrite your code if you chose to adopt it (we will continue to maintain the v0.1.x branch which offers a different approach to this problem).

The major difference here is a shift away from using a custom error type (generated using the error_shim!(...) macro in v0.1) to instead using a standard error type with better support for providing additional advice, and improved interoperability with the standard library's Error type. We've also shifted from using impl From<E> for MyErrorType as the primary means of wrapping errors to instead providing extensions for Results<T, E> which simplify wrapping errors with contextual advice (a pattern which was used extensively within codebases implementing human_errors).

What's Changed

Before

use human_errors;
use std::fs;
human_errors::error_shim!(MyError);
fn read_config() -> Result<String, MyError> {
fs::read_to_string("config.toml").map_err(|err| {
user_with_internal(
"We could not read the configuration file.",
"Make sure that you've specified a valid config file with the --config option.",
err
)
})
}

After

... (truncated)

Commits
  • 1a0263e Merge pull request #33 from SierraSoftworks/feat/cli-rendering
  • 69912cc style: Fix formatting
  • 4279218 ci: Enable testing of code changes
  • 710c373 tweak: Rename feature to "pretty"
  • c92c35e docs: Improve documentation for use of pretty printing
  • 4487e05 style: Resolve clippy warnings
  • 49ccaca style: Format code with cargo fmt
  • 8df7d66 feat: Add support for rendering a pretty error to the CLI
  • 9c1f84e tweak: Adjust the formatting of user and system error descriptions
  • dc77ae4 style: Rearrange the code slightly
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [human-errors](https://github.com/SierraSoftworks/human-errors-rs) from 0.1.5 to 0.2.2.
- [Release notes](https://github.com/SierraSoftworks/human-errors-rs/releases)
- [Commits](SierraSoftworks/human-errors-rs@v0.1.5...v0.2.2)

---
updated-dependencies:
- dependency-name: human-errors
  dependency-version: 0.2.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Dec 24, 2025
Copy link
Member

@notheotherben notheotherben left a comment

Choose a reason for hiding this comment

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

Approving dependency upgrades.

@notheotherben
Copy link
Member

@copilot please put together a PR switching to v0.2.2 of human-errors by following the guidance provided in the release notes and consulting SierraSoftworks/github-backup#453 which makes a similar change for a different project.

Before

use human_errors;
use std::fs;

human_errors::error_shim!(MyError);

fn read_config() -> Result<String, MyError> {
    fs::read_to_string("config.toml").map_err(|err| {
        user_with_internal(
            "We could not read the configuration file.",
            "Make sure that you've specified a valid config file with the --config option.",
            err
        )
    })
}

After

use human_errors::ResultExt;
use std::fs;

fn read_config() -> Result<String, human_errors::Error> {
    fs::read_to_string("config.toml").wrap_err_as_user(
      "We could not read the configuration file.",
      &["Make sure that you've specified a valid config file with the --config option."])
}

Copy link
Contributor

Copilot AI commented Jan 2, 2026

@notheotherben I've opened a new pull request, #1677, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 13 commits January 2, 2026 21:40
Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
- Removed wrapper functions from errors/mod.rs
- Updated all error conversion modules to use human_errors directly
- Replaced all errors::user/system calls with human_errors::user/system
- Replaced errors::user_with_internal/system_with_internal with human_errors::wrap_user/wrap_system
- Added StringError helper type for string-based error causes
- Converted advice parameters to static string arrays &[&str]
- Rewrote dynamic advice messages to include context in error message itself

This follows the guidance from SierraSoftworks/github-backup#453
where dynamic content is moved from advice to the main error message.

Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
Fixed multiple syntax issues introduced during automated refactoring:
- Fixed mismatched parentheses and braces
- Corrected format! macro calls
- Rewrote dynamic advice messages to be static
- Merged dynamic context into main error messages

Most syntax errors resolved. A few edge cases remain in resolver.rs.

Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
Removed StringError wrapper as strings can be passed directly to human_errors functions.
- Deleted StringError type definition from errors/mod.rs
- Replaced all errors::StringError::new(...) with direct string values
- Fixed several syntax errors from previous automated refactoring

Addresses feedback in comment 3706408749.

Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
- Fixed malformed format! calls and mismatched braces
- Reverted heavily damaged files to clean state for proper migration
- Ready to apply human_errors API changes cleanly

Addresses the new requirement to use ResultExt methods.

Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
Migrate to human-errors v0.2.2 direct API usage
@notheotherben notheotherben merged commit 7a16b50 into main Jan 3, 2026
9 of 10 checks passed
@notheotherben notheotherben deleted the dependabot/cargo/human-errors-0.2.2 branch January 3, 2026 14:00
@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 48.52941% with 280 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.04%. Comparing base (3dfe612) to head (cba5e9f).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
src/errors/reqwest.rs 0.00% 47 Missing ⚠️
src/online/service/github.rs 47.05% 27 Missing ⚠️
src/engine/resolver.rs 66.66% 19 Missing ⚠️
src/update/manager.rs 42.85% 16 Missing ⚠️
src/update/cmd.rs 0.00% 15 Missing ⚠️
src/errors/serde.rs 0.00% 12 Missing ⚠️
src/tasks/move_directory.rs 0.00% 11 Missing ⚠️
src/update/github.rs 60.71% 11 Missing ⚠️
src/engine/identifier.rs 9.09% 10 Missing ⚠️
src/errors/std_io.rs 0.00% 10 Missing ⚠️
... and 29 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1672      +/-   ##
==========================================
+ Coverage   85.34%   88.04%   +2.70%     
==========================================
  Files          98       99       +1     
  Lines        7971     7840     -131     
==========================================
+ Hits         6803     6903     +100     
+ Misses       1168      937     -231     
Files with missing lines Coverage Δ
src/commands/apps.rs 100.00% <ø> (ø)
src/commands/config.rs 98.70% <ø> (+1.26%) ⬆️
src/commands/doctor.rs 100.00% <ø> (ø)
src/commands/fix.rs 92.98% <ø> (ø)
src/commands/helpers.rs 92.42% <100.00%> (+0.36%) ⬆️
src/commands/ignore.rs 94.73% <ø> (+9.02%) ⬆️
src/commands/info.rs 100.00% <ø> (ø)
src/commands/list.rs 98.87% <ø> (ø)
src/commands/prune.rs 99.48% <ø> (ø)
src/commands/services.rs 100.00% <ø> (ø)
... and 67 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants