Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @marko-bekhta and happy new year!
So here is the current state of the Jandex implementation rebased on master. Sorry for it taking so long, I got sick during the holidays and wasn't sufficiently well to make progress on this.
I squashed all your preliminary work in one unique commit as it turned out to be a real pain to rebase given all the changes made by Gunnar in his container work. So I thought fixing the conflicts only once next time would be great ;).
I think it's in a not too bad shape. What is a bit of a shame is that we can use the index only to a certain extent and then we need to go back to reflection. I think we won't be able to do otherwise except if we start a major refactoring to avoid depending too much on reflection in the core HV. Not sure it's gonna happen soon so let's keep it that way for now.
So, the next question is what to do next?
I think it might be a good idea to build an index for each HV module containing annotations we might look for and also an index for validation-api. This could be done with the Jandex Maven plugin (https://github.com/wildfly/jandex-maven-plugin). I think it would be a good idea to create separate indexes for main classes and test classes.
I think you might then be able to assemble a view of all these indexes with
CompositeIndex
, asking the ClassLoader for allMETA-INF/jandex.idx
resources.As for the test failure you have, I really got no idea. It works perfectly for me in Eclipse and Maven with the following configuration: