On 27. 08. 21 10:21, Ladislav Thon wrote:
> - Move to SmallRye, both on GitHub and in the Maven coordinates space.
> The `groupId` will change, but the package name will not. This has the
> potential to cause nondeterministic classpath, so configuring Enforcer
> to ban `org.jboss:jandex` will be a good idea.
Hm, so `io.smallrye:jandex` is the new GA? I'm asking because some
smallrye projects use the `smallrye-` prefix in the artifactId and some
use a more specific groupId, e.g `io.smallrye.config`.
> - `Indexer.index()` will no longer return `ClassInfo`. The very
> existence of this return type prevents doing post-processing in
> `Indexer.complete()`, which we’d need to do to properly resolve some
> recursive generic declarations. The recently introduced `Index.of()`
> methods are a nicer way to quickly construct an index for test purposes.
Note that in Quarkus we don't use the Indexer.index() for test purposes
but to lazily index classes on the class path that are missing in the
index built from the app.
I'm not totally sure what you mean here, but would `Indexer.index()` returning `void` prevent you from doing that? You can still construct a full index and then lookup the class form it, no?
(From Jandex perspective, indeed we can't assume we'll be given a complete classpath. So `Indexer.complete()` doing post-processing may still be unable to fully resolve everything. Such is the fact of life.)
> - Runtime-invisible annotations (i.e., `RetentionPolicy.CLASS`) will be
> visible in the index. Hopefully this is just an FYI.
Hm, I'm +1 on this but wouldn't this result in much bigger indexes?
I don't think it would be _much_ bigger, mostly because there isn't much runtime-invisible annotations out there. Mike Edgar, who is contributing the feature, says the memory impact is minimal. I haven't personally done any measurement. Feel free to look at and/or comment in
https://github.com/wildfly/jandex/pull/129.
Thanks for your comments!
LT