-
-
Notifications
You must be signed in to change notification settings - Fork 969
remove old asm & AnnotationMetadataReader supporting classes; adopt SimpleMetadataReaderFactory #14922
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
Conversation
…pring's SimpleMetadataReaderFactory instead - see https://github.com/spring-projects/spring-framework/wiki/MergedAnnotation-API-internals
jamesfredley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Won't this put as back to where we were before the changes in 679acbe? |
I don't think the Spring classes were removed in 6.x. But rather replaced by final, package protected classes for internal use only. Hence we had to copy them.
|
|
Is there a reasonable simple way to compare performance and see if the changes made during https://github.com/spring-projects/spring-framework/wiki/MergedAnnotation-API-internals come close? |
|
@matrei We do not need the visitor, only the factory. In the event we need to customize it, we can simply fork it again. One of the reasons Spring rewrote it was because of performance. The other major concern is the old implementation had several known issues - from bugs to not supporting graalvm. @jamesfredley the more I think about this, I think its more important to be correct. If it does |
Yes, if we are not going to use Graeme's
This would be very interesting to see. I doubt Graeme would have gone through the trouble to implement |
From what I can tell, AnnotationMetadataReader was written for performance reasons. Since Spring 5.2, this was deprecated and finally removed in 6.x. We had copied the file from Spring to get Grails 7 working, but I'm not sure this was the right decision.
Searching the internet + using chatgpt, I noticed this document. Out of curiosity, I removed the AnnotationMetadataReader & replaced it with the upstream Spring reader. All of the tests pass.
I wanted to create this PR as a discussion point since:
@RepeatableI'm going to leave this open for discussion in next week's weekly dev meeting.