-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "stacked" composite index #142
Comments
An alternative would be to modify |
And it turns out that |
Arc and RESTEasy Reactive already have annotation transformers to achieve this, you should take a look at the |
At this moment, I know the callback-based annotation transformation in Quarkus by heart, and I can confidently say that 1. it is a bad fit for Jandex, and 2. it doesn't solve all use cases people have. Ad 1., it would either require massive refactoring in Jandex to make the Jandex public API return the transformed annotations (and would violate the immutability promise), or Jandex would be just a carrier of a completely independent annotation overlay mechanism. Having a completely independent annotation overlay mechanism isn't necessarily a bad thing, but I'm going to claim that Jandex shouldn't be its home. Because... Ad 2., see e.g. #117. Annotations are not the only thing people want to transform. I'd like to have a proper overlay mechanism in Jandex for sure -- but it's not going to be a copy of what Quarkus does. |
I also think that the annotation transformers API from Quarkus should not be incorporated into Jandex, or at least not incorporated into the
Well, I think that it was really a bad idea to copy the ArC API into the RESTEasy Reactive project. Think about maintenance and API evolution... The API should have been probably extracted into a shared library and into the
All I can say is that I don't believe it's a good idea to allow users to do something like this. It's just too easy to shoot yourself in the leg. We've seen this many times in the CDI API where people got too creative when supplying |
FTR, I've got one more thing I would like to add to Jandex that should help a lot with overlaying -- the notion of equivalence. Jandex classes often don't have Let me file an issue for that. EDIT: #158 |
Note to self: vast majority of use cases I've seen so far only need transforming annotations (including the use cases behind #117). There's one more interesting use case in quarkusio/quarkus#19883 that is more complex. |
I renamed this issue, because it suggested a concrete name: Instead, I'm thinking this could be called a |
Jandex includes
CompositeIndex
, which combines multiple indices that don't overlap. When the indices do overlap,CompositeIndex
will return duplicates.We could add an
OverlayIndex
which would overlay one index on top of another (or perhaps a stack of indices, not just two). Some methods onIndexView
are perhaps hard to define, but the most common ones should be possible.Something like this:
The text was updated successfully, but these errors were encountered: