On Wed, 24 Nov 2021 12:32:32 GMT, Michael Hall <mik3h...@gmail.com> wrote:
> Would there be any need to scan class path at all? That would mean a module > would have a class path dependency wouldn't it? One reason of scanning the class path is to detect any split packages and emit warnings. > Yes, I shouldn't of included -cp at all but shouldn't keeps ignore it? In general, a module should not depend on any class on the classpath. However, it's possible that there is any missing dependency i.e. can't be found from its required modules. One could use `-cp` to add additional libraries for a quick analysis. I got your point though. Scanning class path is not strictly necessary to analyze dependencies and it can be done lazily. Finding all packages in the unnamed module is just the current implementation. I'll consider and look into making it lazy. ------------- PR: https://git.openjdk.java.net/jdk/pull/6531