Skip to content

Conversation

ArhanChaudhary
Copy link

A port of the implementation #1707 to resolve the merge conflicts, of which there were many. It currently does not compile, because I'm unfamiliar with the codebase, but it is something.

Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (c527ae4) to head (013807c).
⚠️ Report is 7 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (c527ae4) and HEAD (013807c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c527ae4) HEAD (013807c)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2517       +/-   ##
==========================================
- Coverage   79.42%   0.00%   -79.43%     
==========================================
  Files         107      12       -95     
  Lines       23971    2286    -21685     
==========================================
- Hits        19038       0    -19038     
+ Misses       4933    2286     -2647     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sunshowers
Copy link
Member

I apologize but there are now merge conflicts again due to recent changes. Would you be willing to resolve them? I'll try and hold off on other changes before getting this done.

Comment on lines 9 to 12
pub mod displayer;
mod error_description;
pub mod events;
mod helpers;
Copy link
Member

Choose a reason for hiding this comment

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

Rather than making displayer pub, could you export the necessary types in the pub use displayer:: below?

Copy link
Author

Choose a reason for hiding this comment

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

Done!

@ArhanChaudhary
Copy link
Author

Sure! Let me do that right now

Copy link
Member

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

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

Thanks for your patience (have been extremely busy recently). This is in pretty good shape -- it mostly needs tests and some code updates.

Comment on lines +1188 to +1189
(Some((stream @ "stdout" | stream @ "stderr", Err(_))), _) => return Err(format!("\n unrecognized setting for {stream}: [possible values: immediate, immediate-final, final, never]")),
(_, Some((stream @ "stdout" | stream @ "stderr", Err(_)))) => return Err(format!("\n unrecognized setting for {stream}: [possible values: immediate, immediate-final, final, never]")),
Copy link
Member

Choose a reason for hiding this comment

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

This should return a structured error (TestOutputDisplayParseError or similar) and the formatting should be handled in the Display impl for the error.

Comment on lines +1173 to +1177
// expected input has three forms
// - "{value}": where value is one of [immediate, immediate-final, final, never]
// - "{stream}={value}": where {stream} is one of [stdout, stderr]
// - "{stream}={value},{stream=value}": where the two {stream} keys cannot be the same
let (stdout, stderr) = if let Some((left, right)) = s.split_once(',') {
Copy link
Member

Choose a reason for hiding this comment

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

There's got to be a much better way to write this. One way would be to write a small left-to-right parser using winnow for this, reading characters until you reach a comma or equals sign. Another would be to first decompose the string into components, and then match on them.

This also needs tests.

Comment on lines +25 to +33
/// When to display test output in the reporter.
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
#[cfg_attr(test, derive(test_strategy::Arbitrary))]
pub struct TestOutputDisplayStreams {
/// When to display the stdout output of a test in the reporter
pub stdout: Option<TestOutputDisplay>,
/// When to display the stderr output of a test in the reporter
pub stderr: Option<TestOutputDisplay>,
}
Copy link
Member

Choose a reason for hiding this comment

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

Need some tests for this.

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