Skip to content

[2.x] refactor: Change the test type - #8181

Merged
eed3si9n merged 1 commit into
sbt:developfrom
eed3si9n:wip/test-type
Aug 2, 2025
Merged

eed3si9n merged 1 commit into
sbt:developfrom
eed3si9n:wip/test-type

Conversation

@eed3si9n

@eed3si9n eed3si9n commented Aug 2, 2025

Copy link
Copy Markdown
Member

Problem

test task is typed to unit.
To distinguish test from any other tasks, we want to actually type this to something.

Solution

Forward TestResult to the test task.

**Problem**
test task is typed to unit.
To distinguish test from any other tasks, we want to actually type this to something.

**Solution**
Forward TestResult to the test task.
@eed3si9n
eed3si9n merged commit 7550356 into sbt:develop Aug 2, 2025
@eed3si9n
eed3si9n deleted the wip/test-type branch August 2, 2025 22:27
unkarjedy added a commit to unkarjedy/sbt that referenced this pull request Aug 21, 2026
**Problem**
Commit c8737b8, "refactor: Change the test type" (PR sbt#8181, Eugene Yokota), made Tests.Output and SuiteResult private[sbt] while changing test tasks to return TestResult. The stated rationale was to type test tasks; it did not describe restricting TestResultLogger customization.

TestResultLogger remains a public, documented extension point, but its run method accepts Tests.Output. External plugins consequently cannot implement it in source. This was noticed while working on TW-102637.

**Solution**
Restore public visibility for Tests.Output, SuiteResult, and its companion. Add a scripted external-build regression test that implements TestResultLogger, uses Output.events as Iterable[SuiteResult], runs test, and observes the logger.

**Overview**
The detailed report type is public again, making the public TestResultLogger API implementable by external plugins.

**Previous behavior**
The rich report type was hidden despite leaking through TestResultLogger. Only the coarse TestResult task outcome was publicly usable, leaving no public replacement for per-suite events and summaries.

**Improvements**
Custom result loggers can compile and consume the report types again. The scripted test prevents this public API boundary from regressing.

**Assumptions, limitations, and trade-offs**
This intentionally restores the compatibility commitment for the detailed report model that existed before PR sbt#8181. It does not change test execution, task result values, or report contents.

Co-authored-by: Codex <noreply@openai.com>
eed3si9n pushed a commit that referenced this pull request Aug 24, 2026
**Problem**
Commit c8737b8, "refactor: Change the test type" (PR #8181, Eugene Yokota), made Tests.Output and SuiteResult private[sbt] while changing test tasks to return TestResult. The stated rationale was to type test tasks; it did not describe restricting TestResultLogger customization.

TestResultLogger remains a public, documented extension point, but its run method accepts Tests.Output. External plugins consequently cannot implement it in source. This was noticed while working on TW-102637.

**Solution**
Restore public visibility for Tests.Output, SuiteResult, and its companion. Add a scripted external-build regression test that implements TestResultLogger, uses Output.events as Iterable[SuiteResult], runs test, and observes the logger.

---------

Co-authored-by: Codex <noreply@openai.com>
eed3si9n pushed a commit that referenced this pull request Aug 28, 2026
**Problem**
Commit c8737b8, "refactor: Change the test type" (PR #8181, Eugene Yokota), made Tests.Output and SuiteResult private[sbt] while changing test tasks to return TestResult. The stated rationale was to type test tasks; it did not describe restricting TestResultLogger customization.

TestResultLogger remains a public, documented extension point, but its run method accepts Tests.Output. External plugins consequently cannot implement it in source. This was noticed while working on TW-102637.

**Solution**
Restore public visibility for Tests.Output, SuiteResult, and its companion. Add a scripted external-build regression test that implements TestResultLogger, uses Output.events as Iterable[SuiteResult], runs test, and observes the logger.

---------

Co-authored-by: Codex <noreply@openai.com>
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.

1 participant