tombentley / typeparser

Parse Strings into Ceylon metamodels
Other
1 stars 2 forks source link

Better package resolution #4

Open tombentley opened 8 years ago

tombentley commented 8 years ago

The TypeParser fails to find the Package for classes when the module name is not a prefix of the package name. For example for com.redhat.ceylon.compiler.java.runtime.metamodel.decl::ClassWithInitializerDeclarationImpl the package resolving algorithm sees com.redhat.ceylon.compiler.java and finds the the compiler-java module, then fails to find the package within that. That's because the given package is actually in the ceylon.language module.

tombentley commented 8 years ago

A related issue is that by default the TypeParser will populate its modMap using modules.list which can contain duplicates and returns all loaded modules -- even ones not visible to (or even transitively depended upon by) the client of typeparser.