MerlinTHS
11/26/2023, 5:42 PMdmitriy.novozhilov
11/26/2023, 6:45 PMdmitriy.novozhilov
11/26/2023, 6:46 PMMerlinTHS
11/26/2023, 7:02 PMJavier
11/26/2023, 7:16 PMralf
11/27/2023, 5:24 AM[LookupPredicate] allows user to get all declarations in current moduleIs there a mechanism for the entire classpath yet? There was a way to do this in K1, it was slow but possible. The Anvil compiler plugin generated code in a specific package to speed up look up times.
dmitriy.novozhilov
11/27/2023, 10:28 AMSo “Note that [MetaAnnotatedWith] predicate has no implementation in [LookupPredicate] hierarchy and can not be used for global lookup” means, I cannot register a DeclarationPredicate for meta annotations in my extension? I can only use it for filtering already matched symbols?Yes. It's done in this way because of technical limitation For lookup predicates compiler generates indices of annotated declaration before all analysis phases (to make lookups fast) And including meta-annotations for lookups causes a lot of problems with this approach, because it requires multiple rounds of this indexing and problems with invalidating of those indices if on real analysis stage some annotation on declaration will be resolved to different one Also there is a cycle in logic: • meta-annotated annotation may be generated by the plugin • before invoking plugins compiler should build indices • to build complete index compiler should consider annotation generated by plugin
dmitriy.novozhilov
11/27/2023, 10:28 AMIs there a mechanism for the entire classpath yet?There isn't (and not actually planned)
ralf
11/27/2023, 3:47 PM