complete the migration from thiserror to gix-error - #2847
complete the migration from thiserror to gix-error#2847Sebastian Thiel (Byron) wants to merge 32 commits into
Conversation
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
|
Did the comparison. Three things, plus one offer. 1. 2. 3. I've written a guard for that: Also: in On the comparison: I audited every There's more from the sweep — a per-type verdict on all 42 types #2716 left concrete, an erasure order for the E0119 chains, and a list of dropped |
|
Thanks Amey Pawar (@ameyypawar), while noting that I find no pleasure in reading these AI generated blobs of text. My main gripe is that it's a bot speaking through you, so unless you say you produced this text by hand or think you could produce it, disclosure is the way to go. I recommend adding a few lines of yourself on top giving me your verdict, no matter what it is (i.e. something like "this looks reasonable to me, and I spot-checked one of these claims"), followed, by a separator to clearly mark the AI blob. Thanks again. |
b7df324 to
92a3276
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
92a3276 to
240b509
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
240b509 to
6b1745e
Compare
|
Re-checked after your push. Four things I'd still look at. The message loss bothers me most; on the security tests I'd rather have your call than mine. The sweep and this write-up are both AI-produced — I took help of AI tools throughout. I checked the two source arms and the Messages dropped: 53 sites, 50 distinct. Worst: 17 assertions weakened. Two matter: the three erased-API asserts in
Dead branches: Also: ~31 double-wraps left after the 19 you removed — a floor, counted from monomorphised instantiations rather than grep, so I can pull the list if useful. And |
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
6b1745e to
153109c
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
153109c to
1ab89b7
Compare
1ab89b7 to
e9f189c
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
|
Thanks Amey Pawar (@ameyypawar). This is an interesting experiment as you essentially take the role of a reviewer, while my agent double-checks and fixes. And all that without any human review, so I am already very curious on how the actual review can be done efficiently. |
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
e9f189c to
2d9f5d9
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
2d9f5d9 to
5647e7f
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
5647e7f to
04a637e
Compare
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
04a637e to
2224378
Compare
# ee02574 feat: classify corrupt data in gix-error feat: classify corrupt data in gix-error # 9a6931865c feat: classify missing resources in gix-error feat: classify missing resources in gix-error # 2a5cf4e895 feat: convert boxed errors into gix-error feat: convert boxed errors into gix-error # d83cbf1aa6 feat: classify invalid input in gix-error feat: classify invalid input in gix-error # ec3bfdfc2a fix: retain classification through nested gix errors fix: retain classification through nested gix errors # 54d8a86d2d fix: preserve copied error source chains fix: preserve copied error source chains # d2e1310710 fix: preserve probable causes when flattening error trees fix: preserve probable causes when flattening error trees # 77138dde03 fix: expose stored error types in chain mode fix: expose stored error types in chain mode # 4913a5b66b fix: preserve nested gix errors when raising context fix: preserve nested gix errors when raising context # e19fc18432 fix: retain typed probable causes through nested gix errors fix: retain typed probable causes through nested gix errors
Hand-expand the traversal errors because callers classify cancellation and lookup failures by variant. Validation: cargo test -p gix-traverse --all-targets --features sha1; cargo check --workspace --all-targets
Hand-expand discovery errors because callers classify repository search and validation outcomes by variant. Validation: cargo test -p gix-discover --all-targets --features sha1; cargo check --workspace --all-targets
Hand-expand credential errors because helper fallback, missing credentials, and protocol failures are classified by callers. Validation: cargo test -p gix-credentials --all-targets; cargo check --workspace --all-targets
Hand-expand directory-walk errors because callers classify interruption and root failures by variant. Validation: cargo test -p gix-dir --all-targets --features sha1; cargo check --workspace --all-targets
Hand-expand status errors because their variants remain part of caller-visible classification. Validation: cargo test -p gix-status --all-targets --all-features; cargo check --workspace --all-targets
Hand-expand blame errors because callers classify invalid ranges and traversal failures by variant. Validation: cargo test -p gix-blame --all-targets; cargo check --workspace --all-targets
Hand-expand checkout errors because delayed-filter and path failures remain caller-visible classifications. Validation: cargo test -p gix-worktree-state --all-targets --features sha1; cargo check --workspace --all-targets
Hand-expand submodule configuration errors because invalid path, URL, update, and pathspec outcomes are matched by callers. Validation: cargo test -p gix-submodule --all-targets --features sha1; cargo check --workspace --all-targets
# cbe6997 Refresh of migrate-transport-errors Refresh of migrate-transport-errors # b956d44 feat!: remove thiserror from gix-ref feat!: remove thiserror from gix-ref # b6fcd11 feat!: remove thiserror from gix-pack feat!: remove thiserror from gix-pack # 59cbc94 feat!: remove thiserror from gix-odb feat!: remove thiserror from gix-odb # d145f21 fix: gate HTTP retry inspection with its feature fix: gate HTTP retry inspection with its feature
# 1436ecb feat!: migrate object-facing gix errors to gix::Error feat!: migrate object-facing gix errors to gix::Error # 83ede2b feat!: expose repository open failures as gix::Error feat!: expose repository open failures as gix::Error # bd47992 feat!: expose repository initialization failures as gix::Error feat!: expose repository initialization failures as gix::Error # 217dcc2 feat: classify invalid input in gix-error feat: classify invalid input in gix-error # b8c9fb4 feat!: expose gix configuration failures as gix::Error feat!: expose gix configuration failures as gix::Error # 508c1b1 feat!: expose repository failures as gix::Error feat!: expose repository failures as gix::Error # ccd246f feat!: expose reference failures as gix::Error feat!: expose reference failures as gix::Error # 2b9ed88 feat!: expose submodule failures as gix::Error feat!: expose submodule failures as gix::Error # 5ece2a2 feat!: expose worktree and status failures as gix::Error feat!: expose worktree and status failures as gix::Error # 8352acd migrate remaining gix errors to gix-error migrate remaining gix errors to gix-error
CI exposed three remaining migration adaptations: gix-shallow doctests could not convert Exn through Box<dyn Error>, the ein init journey snapshots still expected the removed enum message, and lint rejected two mechanical expressions. Convert Exn explicitly in the doctest, update both init snapshots, and apply the two lint-preserving rewrites. Observed in test-doc, test-journey, and lint on PR #2847.
Preserved source chains now retain the handshake context above SSH argument validation failures. Update every receive and clone journey snapshot in this family together.
CI uses the current stable formatter and requires six mechanical layout updates in migrated files.
Preserve the public-facing context from the former thiserror variant while retaining the interpolation error as its source.
2224378 to
23e328b
Compare
23e328b to
dcecd30
Compare
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by Codex GPT-5.
Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Reported issue
Refs #2351
Summary
thiserroruse from workspace crates and exposes top-level failures throughgix::Errorgix-erroranyhowin the binaries and forwards thegix-error/anyhowfeature throughgixValidation
cargo check --workspace --all-targetscargo test -p gix-errorcargo test -p gix-error --features auto-chain-error --test auto-chain-errorcargo test -p gix --test gix revision::spec::