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

module lookup on behalf of automatic modules

Open
#2,764 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Debugging #2749 for #2748 I was puzzled by the following:

We have a few code locations where we differentiate if we should look for **all** observable modules or only for all **named** modules.

[JLS §7](https://docs.oracle.com/javase/specs/jls/se22/html/jls-7.html) introduces automatic modules without any mention of what an auto module can read.

[JEP 261](https://openjdk.org/jeps/261) has nothing helpful in this regard.

Javadoc of [ModuleFinder.of()](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/module/ModuleFinder.html#of(java.nio.file.Path...)) defines how an auto module is identified, and what it exports, but no word on what it reads.

Finally the [Javadoc of package java.lang.module](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/module/package-summary.html) declares:
> If B is an automatic module, then A "reads" every other enumerated automatic module. (It is "as if" an automatic module has 'requires transitive' directives for every other enumerated automatic module).

In previous bugs like [bug 518282](https://bugs.eclipse.org/bugs/show_bug.cgi?id=518282) we worked from a version that said
> For each enumerated module X that is automatic: X "reads" every other enumerated module

where no restriction to automatic modules was present. I have no record of what "specification" we worked from in those days. I only vividly recall that we had a tremendously hard time to gather any sufficient set of specifications.

At the same time we might want to check for similar loose ends regarding the unnamed module.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.