Skip to content

Many errors#5

Merged
maxwase merged 17 commits into
masterfrom
many-errors
Jun 23, 2026
Merged

Many errors#5
maxwase merged 17 commits into
masterfrom
many-errors

Conversation

@maxwase

@maxwase maxwase commented May 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends errortools with an alloc-enabled aggregated error type (ManyErrors) for collecting multiple context-tagged errors, while also refactoring and centralizing test fixtures/strategies to reduce per-module test boilerplate.

Changes:

  • Add ManyErrors + Listing formatting strategy (alloc feature) for aggregated, context-tagged iterator/fold errors.
  • Introduce AsDisplay sentinel Format strategy to delegate formatting to a value’s Display.
  • Consolidate test fixtures/format strategies into src/tests.rs and update existing unit tests accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/with_context.rs Renames the format type parameter and updates tests to use shared fixtures.
src/tree.rs Updates tests to use shared Inner fixture and minor naming tweaks.
src/tests.rs New shared test fixtures and reusable Format strategies.
src/suggestion.rs Reworks tests around the “Suggest is not delegated” invariant using shared fixtures.
src/oneline.rs Updates tests to reuse shared Arrow formatter and shared fixtures.
src/many_errors/mod.rs New alloc-only ManyErrors aggregate error type + Listing formatting strategy.
src/many_errors/iter.rs New iterator + collection (FromIterator/Extend) integrations for ManyErrors.
src/main_result.rs Updates tests to use shared fixtures instead of local test-only error types.
src/lib.rs Adds alloc support + exports, introduces AsDisplay, and switches tests to src/tests.rs.
src/add.rs Updates tests to use shared fixtures.
Cargo.toml Adds alloc feature and makes std imply alloc.
.github/workflows/ci.yml Expands CI matrix to include --no-default-features --features alloc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/many_errors/iter.rs Outdated
Comment thread src/with_context/mod.rs
Comment thread src/lib.rs Outdated
Comment thread src/many_errors/iter.rs Outdated

impl<C, E, WithContextFormat> ManyErrors<C, E, WithContextFormat> {
/// Returns an iterator over references to each recorded [`WithContext`].
pub fn iter(&self) -> Iter<'_, C, E, WithContextFormat> {

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.

Comment thread src/lib.rs Outdated
Comment thread src/many_errors/mod.rs Outdated
Comment on lines +205 to +206
/// Renders as a branching Unicode tree with a count header (same as default [`Display`]).
pub fn tree(&self) -> crate::Formatted<&Self, Tree> {
Comment thread src/many_errors/mod.rs
Comment thread src/many_errors/strategy/one_line.rs Outdated
Comment thread src/add/separator.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

Comment thread src/many_errors/mod.rs Outdated
@maxwase maxwase marked this pull request as ready for review June 23, 2026 16:08
@maxwase maxwase requested a review from Copilot June 23, 2026 16:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.

Comment thread CHANGELOG.md Outdated
Comment thread src/add/separator.rs
@maxwase maxwase merged commit 3b629d1 into master Jun 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants