Hi

Maybe this is already planned, but I'd like for the tools to provide more "sanity checks" & give warnings. For example in the following cases:

- both at compile-time (javac) and package-time (jar): an "exports" clause which denotes a non-existent package - at package-time: specifying a main class which is not actually in the module While I can imagine valid use cases for allowing the above, I feel that a warning would be helpful here.

- at compile-time: a "requires" clause which should actually be a "requires public", because some of the dependence's types are "exposed" through some of the exported packages - and the contrary: a "requires public" clause which for which none of its types are exposed through exported packages (again: I'm aware that there are valid use cases for this, e.g. modules like java.se, but a warning would be helpful) Without these warnings, it could get tedious to keep track of which dependences are "exposed" and should therefore be specified as "requires public". Moreover, if you accidentally used "requires public", you cannot remove the "public" afterwards without breaking backward compatibility. A warning could prevent this from happening.

PS: in "The State of the Module System" [1], there's a typo: "because the some" should simply be "because some"

Kind regards,
Anthony

[1] http://openjdk.java.net/projects/jigsaw/spec/sotms/

Reply via email to