Conversation
07cbdfc to
1632f78
Compare
2 tasks
72 tasks
1427ae2 to
bfaba3f
Compare
8bb2abc to
ec904dc
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates 11 plumbing crates from thiserror to gix-error, implementing the project's error handling standardization strategy. The migration replaces enum-based error types with gix_error::Exn and uses message-based error construction for better composability and reduced boilerplate.
Changes:
- Replaces
thiserrorenums withgix_error::Exn<gix_error::Message>orgix_error::ValidationError - Updates error construction to use
message!()andraise()patterns - Adjusts downstream crates to handle new error types via
.into_error()conversions - Replaces deprecated
#[allow(missing_docs)]with#[expect(missing_docs)]throughout
Reviewed changes
Copilot reviewed 299 out of 349 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| gix-bitmap/src/ewah.rs | Converts EWAH decode error from thiserror enum to gix-error ValidationError |
| gix-quote/src/ansi_c.rs | Replaces ansi_c undo error enum with Exn |
| gix-mailmap/src/parse.rs | Converts mailmap parse errors to ValidationError |
| gix-fs/src/stack.rs | Updates path component error to ValidationError |
| gix-lock/src/acquire.rs | Migrates lock acquisition errors to Exn |
| gix-path/src/relative_path.rs | Converts RelativePath error to Exn |
| gix-path/src/realpath.rs | Replaces realpath error enum with Exn |
| gix-packetline/* | Converts encode/decode errors to gix-error types |
| gix-attributes/src/parse.rs | Migrates attribute parse errors to Exn |
| gix-url/src/expand_path.rs | Converts expand_path error to Exn |
| gix-hash/src/* | Replaces all hash-related errors with gix-error types |
| gix-features/src/zlib/* | Converts compression/decompression errors to Exn |
| gix/* | Updates downstream consumers to handle new error types |
This allows to more conveniently create validation errors.
348f983 to
1cfb707
Compare
Replace the thiserror-derived `ewah::decode::Error` enum with `gix_error::Exn<gix_error::ValidationError>`, using `ok_or_raise()` for Option-based error creation. Co-Authored-By: Sebastian Thiel <sebastian.thiel@icloud.com> Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Replace the thiserror-derived `ansi_c::undo::Error` enum with `gix_error::Exn<gix_error::ValidationError>`, converting the `Error::new()` factory and variant constructors to `message!()` calls. Co-Authored-By: Sebastian Thiel <sebastian.thiel@icloud.com> Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Replace the thiserror-derived `parse::Error` enum with `gix_error::Exn<gix_error::ValidationError>`. Tests converted from variant pattern matching to string-based assertions. Co-Authored-By: Sebastian Thiel <sebastian.thiel@icloud.com> Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crates done
gix-errorinstead ofthiserroringix-bitmapgix-errorinstead ofthiserroringix-quotegix-errorinstead ofthiserroringix-mailmapTasks