[Bug] Missing Jigsaw module configuration
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
**Describe the bug**
Currently, Spoon does not seem to provide Jigsaw module definitions (i.e. `module-info.java` files) which leads to need for unstable workaround when using it with Jigsaw-projects, especially Gradle.
**To Reproduce**
`build.gradle`:
```gradle
plugins {
id 'java-library'
}
dependencies {
api 'fr.inria.gforge.spoon:spoon-core:10.2.0-beta-8'
}
/*Code being processed by spoon and leading to the bug.*/
```
`module-info.java`L
```java
module foo.bar.baz {
//noinspection JavaRequiresAutoModule: part of the API
requires transitive spoon.core;
}
```
Output (when running `gradle build`):
```java
~/foo-bar-baz/src/main/java/module-info.java:3: error: module not found: spoon.core
requires transitive spoon.core;
```
This can be temporarily fixed locally by using various workarounds, but normally the problem should be fixed by making Spoon provide real `module-info`.
**Operating system, JDK and Spoon version used**
* OS:`Ubuntu 22.04 LTS x86_64`
* JDK:
```
openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
```
* Spoon version: `10.2.0-beta-8`
Contributor guide
Research direction
Start with the Gradle dependency setup shown in build.gradle and reproduce the failure using the provided module-info.java on JDK 17. Trace how Spoon's published artifact is assembled, then verify that a real module-info.java is available to Gradle so `gradle build` resolves `spoon.core` without workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100