Tune module graph dependencies building
This commit is contained in:
@@ -47,9 +47,14 @@ class JavaModuleGraph(finder: JavaModuleFinder) {
|
|||||||
// Do nothing; all automatic modules should be added to compilation roots at call site as per java.lang.module javadoc
|
// Do nothing; all automatic modules should be added to compilation roots at call site as per java.lang.module javadoc
|
||||||
}
|
}
|
||||||
is JavaModule.Explicit -> {
|
is JavaModule.Explicit -> {
|
||||||
for ((dependencyModuleName) in module.moduleInfo.requires) {
|
if (module.isJdkModule) {
|
||||||
if (visited.add(dependencyModuleName)) {
|
//ct.sym can miss some internal modules from non-transitive dependencies
|
||||||
dfs(dependencyModuleName)
|
dfs(moduleName)
|
||||||
|
} else {
|
||||||
|
for ((dependencyModuleName) in module.moduleInfo.requires) {
|
||||||
|
if (visited.add(dependencyModuleName)) {
|
||||||
|
dfs(dependencyModuleName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ interface JavaModule {
|
|||||||
class Explicit(
|
class Explicit(
|
||||||
val moduleInfo: JavaModuleInfo,
|
val moduleInfo: JavaModuleInfo,
|
||||||
override val moduleRoots: List<Root>,
|
override val moduleRoots: List<Root>,
|
||||||
override val moduleInfoFile: VirtualFile
|
override val moduleInfoFile: VirtualFile,
|
||||||
|
val isJdkModule: Boolean = false
|
||||||
) : JavaModule {
|
) : JavaModule {
|
||||||
override val name: String
|
override val name: String
|
||||||
get() = moduleInfo.moduleName
|
get() = moduleInfo.moduleName
|
||||||
|
|||||||
Reference in New Issue
Block a user