-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Feature
Copy link
Description
Overview
As can be seen below, org.junit.platform.engine.reporting.OutputDirectoryProvider
causes cycles between the platform.engine
and platform.engine.reporting
packages in junit-platform-engine
.
Cycle detected: Slice platform.engine ->
Slice platform.engine.reporting ->
Slice platform.engine
1. Dependencies of Slice platform.engine
- Constructor <org.junit.platform.engine.ExecutionRequest.<init>(org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.EngineExecutionListener, org.junit.platform.engine.ConfigurationParameters, org.junit.platform.engine.reporting.OutputDirectoryProvider, org.junit.platform.engine.support.store.NamespacedHierarchicalStore, org.junit.platform.engine.CancellationToken)> has parameter of type <org.junit.platform.engine.reporting.OutputDirectoryProvider> in (ExecutionRequest.java:0)
- Field <org.junit.platform.engine.ExecutionRequest.outputDirectoryProvider> has type <org.junit.platform.engine.reporting.OutputDirectoryProvider> in (ExecutionRequest.java:0)
- Method <org.junit.platform.engine.EngineDiscoveryRequest.getOutputDirectoryProvider()> has return type <org.junit.platform.engine.reporting.OutputDirectoryProvider> in (EngineDiscoveryRequest.java:0)
- Method <org.junit.platform.engine.EngineExecutionListener.fileEntryPublished(org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.reporting.FileEntry)> has parameter of type <org.junit.platform.engine.reporting.FileEntry> in (EngineExecutionListener.java:0)
- Method <org.junit.platform.engine.EngineExecutionListener.reportingEntryPublished(org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.reporting.ReportEntry)> has parameter of type <org.junit.platform.engine.reporting.ReportEntry> in (EngineExecutionListener.java:0)
- Method <org.junit.platform.engine.ExecutionRequest.create(org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.EngineExecutionListener, org.junit.platform.engine.ConfigurationParameters, org.junit.platform.engine.reporting.OutputDirectoryProvider, org.junit.platform.engine.support.store.NamespacedHierarchicalStore, org.junit.platform.engine.CancellationToken)> has parameter of type <org.junit.platform.engine.reporting.OutputDirectoryProvider> in (ExecutionRequest.java:0)
- Method <org.junit.platform.engine.ExecutionRequest.getOutputDirectoryProvider()> has return type <org.junit.platform.engine.reporting.OutputDirectoryProvider> in (ExecutionRequest.java:0)
2. Dependencies of Slice platform.engine.reporting
- Method <org.junit.platform.engine.reporting.OutputDirectoryProvider.createOutputDirectory(org.junit.platform.engine.TestDescriptor)> has parameter of type <org.junit.platform.engine.TestDescriptor> in (OutputDirectoryProvider.java:0)
Since the junit-platform-engine
artifact is part of the public API for JUnit Platform, we have traditionally not allowed package cycles within that artifact.
Thus, in order to reduce package cycles and improve the quality of the code base, we should deprecate OutputDirectoryProvider
and introduce a new OutputDirectoryCreator
in the org.junit.platform.engine
package. The new name is necessary because OutputDirectoryProvider
has a getOutputDirectoryProvider()
method.
Specifically, I am proposing the following.
- Introduce
org.junit.platform.engine.OutputDirectoryCreator
as a copy oforg.junit.platform.engine.reporting.OutputDirectoryProvider
. - Have
org.junit.platform.engine.reporting.OutputDirectoryProvider
extendorg.junit.platform.engine.OutputDirectoryCreator
. - Deprecate
org.junit.platform.engine.reporting.OutputDirectoryProvider
for removal. - Introduce new APIs that reference
org.junit.platform.engine.OutputDirectoryCreator
instead oforg.junit.platform.engine.reporting.OutputDirectoryProvider
.