-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LauncherInterceptor
is missing from the org.junit.platform.launcher
module's uses
declaration
#3561
Comments
LauncherInterceptor
is missing from the org.junit.platform.launcher
module's uses
declaration
Good catch! I wonder why our modular compilation tests didn't catch that missing |
You can compile without it. It'll only throw at runtime and only if you enable the launcher interceptor configuration: (From LauncherFactory) if (configurationParameters.getBoolean(ENABLE_LAUNCHER_INTERCEPTORS).orElse(false)) {
List<LauncherInterceptor> interceptors = new ArrayList<>();
ServiceLoaderRegistry.load(LauncherInterceptor.class).forEach(interceptors::add);
return interceptors;
} |
I guess Line 28 in f892e81
|
Sure. Yet, a warning should be emitted when running |
Ah, I was unaware of the |
At least, it is an IntelliJ IDEA code inspection: https://www.jetbrains.com/help/idea/list-of-java-inspections.html#visibility "Usage of service not declared in |
Seems like I there's no such lint warning from |
Reopening to backport it to 5.10.2 |
Backported via ec8d428 |
Steps to reproduce
Caused by: java.util.ServiceConfigurationError: org.junit.platform.launcher.LauncherInterceptor: module org.junit.platform.launcher does not declare uses
Context
Probably an oversight since JUnit platform consumed as a module is an uncommon configuration.
The new Interceptor probably just needs to be added here:
https://github.com/junit-team/junit5/blob/main/junit-platform-launcher/src/module/org.junit.platform.launcher/module-info.java#L37
The text was updated successfully, but these errors were encountered: