eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Add support for module-info.test

Open
#5,079 5 comments 0 reactions 0 assignees View on GitHub
jpms
Dominant language
Java
Stars
236
Forks
196
Avg merge
1d 10h
Merged PRs (30d)
49

Description

In [In-module testing with extra java command line options](https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world#in-module-testing-with-extra-java-command-line-options) it has been proposed to use a file `module-info.test` to specify additional arguments needed for compiling and running tests in a modular project.

The content of that file would more or less directly use the syntax of those arguments defined in JEP 261.

While the batch compiler might already be able to evaluate such file by saying `@src/main/test/module-info.test` (haven't tried) I propose to add similar support in the IDE.

I assume the arguments found in that file would replace any arguments implicitly added by JDT for "test" folders.

Perhaps JDT/Core should allow to reference this file via a classpath attribute of the test source folder. This would allow JDT/UI to expose this for configuration in the build path dialog.

If later a standard emerges that achieves the same in an advanced syntax (possibly with additional features), having support for the basic `module-info.test` should still be useful groundwork towards the next stage.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked modular testing proposal and JEP 261, then inspect how JDT currently adds compiler and runtime arguments for test source folders. Determine how a module-info.test file could be referenced from a test source folder and exposed in the build path dialog. Done means the IDE consistently recognizes the file and uses its arguments for modular test compilation and execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.