Skip to content
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

Use sourcegen bytecode generator to generate internal metadata #11407

Open
wants to merge 9 commits into
base: 4.8.x
Choose a base branch
from

Conversation

dstepanov
Copy link
Contributor

The PR rewrites all the class writers (except the evaluated expressions writer) to use a new bytecode generator from Micronaut Sourcegen.

I haven't done any major refactoring. Some classes like BeanDefnitionWriter is too big and need some refactoring

@dstepanov dstepanov added the type: improvement A minor improvement to an existing feature label Dec 4, 2024
@dstepanov dstepanov added this to the 4.8.0 milestone Dec 4, 2024
defaultsStorage,
loadTypeMethods
public static byte[] write(String className, AnnotationMetadata annotationMetadata) {
Map<String, MethodDef> loadTypeMethods = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a linked hash map? Will it impact the order of the methods written?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, it's only used for testing anyway

* @param p The class element
* @return The string representation
*/
private static String toTypeString(ClassElement p) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like something that belongs in ClassElement or a utility method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, we just do some unique string from a class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants