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

Avoid MethodTooLargeException when too many classes to register for reflection #29694

Conversation

essobedo
Copy link
Contributor

@essobedo essobedo commented Dec 5, 2022

fixes #29693

Motivation

When we have too many classes to register for reflection, we get an error indicating that Feature.registerForReflection is too large.

Modifications:

  • Call the methods of type registerClasses by reflection to limit the size of the method
  • Move all the common logic into the generated method _registerClass
  • Manage the different classes to register by batches of CLASSES_TO_REGISTER_BATCH_SIZE (100) classes to limit the size of methods and the number of constant pool items of the class that causes ClassTooLargeException

Result

The extension can be built as expected and the integration tests of the scenario quarkus-qe/beefy-scenarios#324 works even in native mode

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 5, 2022

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should not contain an issue number (use Fix #1234 in the description instead)

This message is automatically generated by a bot.

@quarkus-bot quarkus-bot bot added the area/core label Dec 5, 2022
@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch 2 times, most recently from 2570657 to 17ba88a Compare December 5, 2022 19:01
@essobedo essobedo changed the title Fix #29693: Avoid MethodTooLargeException when too many classes to register for relection Avoid MethodTooLargeException when too many classes to register for reflection Dec 5, 2022
@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from 17ba88a to 0490835 Compare December 5, 2022 19:02
@quarkus-bot

This comment has been minimized.

@geoand geoand requested a review from zakkak December 6, 2022 07:14
@gsmet
Copy link
Member

gsmet commented Dec 6, 2022

Pinging @mkouba as he did a lot of these splits.

@mkouba
Copy link
Contributor

mkouba commented Dec 6, 2022

Call the methods of type registerClass by reflection to limit the size of the method

Well, this is something we'd probably want to avoid. But I'll need to check the reproducer first...

Manage the different classes to register by batches of 100 classes to limit the size of methods and the total amount of constants which causes ClassTooLargeException

@essobedo You did not mention the ClassTooLargeException in the issue description. What constants do you have in mind?

@essobedo
Copy link
Contributor Author

essobedo commented Dec 6, 2022

Well, this is something we'd probably want to avoid. But I'll need to check the reproducer first...

@mkouba let me write an integration test

You did not mention the ClassTooLargeException in the issue description. What constants do you have in mind?

If you have too many methods in a class, you get a ClassTooLargeException. I did not mention it in my original ticket because if you fix the MethodTooLargeException, you still get a ClassTooLargeException. In other words, there are actually 2 problems to fix but the first one (MethodTooLargeException) hides the other one.

@mkouba
Copy link
Contributor

mkouba commented Dec 6, 2022

If you have too many methods in a class, you get a ClassTooLargeException. I did not mention it in my original ticket because if you fix the MethodTooLargeException, you still get a ClassTooLargeException. In other words, there are actually 2 problems to fix but the first one (MethodTooLargeException) hides the other one.

I see. Well, we do generate one registerClassX for each class and the jvm limit is 65K so there must be other parts of the generation process that contribute to this problem.

Copy link
Contributor

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

Hi @essobedo , thank you for the contribution.

I have added a couple of suggestions on how to improve this, please have a look and either implement the suggestions or let me know if you disagree.

@essobedo
Copy link
Contributor Author

essobedo commented Dec 6, 2022

Any idea in which module I can add an integration test?

@essobedo
Copy link
Contributor Author

essobedo commented Dec 6, 2022

Unless you know a better place to add my IT, by default I will add it to integration-tests/maven

@mkouba
Copy link
Contributor

mkouba commented Dec 6, 2022

Unless you know a better place to add my IT, by default I will add it to integration-tests/maven

Do you plan to add the dependency to the swift library or what exactly would you like to test? I mean do you intend to test a use case with thousands of classes registered for reflection?

@essobedo
Copy link
Contributor Author

essobedo commented Dec 6, 2022

Unless you know a better place to add my IT, by default I will add it to integration-tests/maven

Do you plan to add the dependency to the swift library or what exactly would you like to test? I mean do you intend to test a use case with thousands of classes registered for reflection?

Yes I plan to test a use case with thousands of classes registered for reflection but ideally without adding the swift library for the sake of simplicity if possible

@mkouba
Copy link
Contributor

mkouba commented Dec 6, 2022

Yes I plan to test a use case with thousands of classes registered for reflection but ideally without adding the swift library for the sake of simplicity if possible

That sounds like something that should go outside of the quarkus core. Maybe https://github.com/quarkus-qe/beefy-scenarios or similar?

@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch 2 times, most recently from a5a88a9 to 43fc80e Compare December 6, 2022 13:54
@essobedo essobedo requested a review from zakkak December 6, 2022 13:55
@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from 43fc80e to d7c9c1e Compare December 6, 2022 13:57
@essobedo
Copy link
Contributor Author

essobedo commented Dec 6, 2022

@mkouba I have proposed a PR with the test case to reproduce quarkus-qe/beefy-scenarios#324

Copy link
Contributor

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM, other than the suggestion I added.

Still not convinced we need to make the invocations to registerClasses* through reflection, but it's not a blocker for me.

@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from d7c9c1e to ff1eeb4 Compare December 6, 2022 18:26
@essobedo essobedo requested a review from zakkak December 6, 2022 18:26
Feature.BeforeAnalysisAccess.class);
currentRegisterClass.setModifiers(Modifier.PRIVATE | Modifier.STATIC);
}
boolean hasConstructorsToHandle = !entry.getValue().weak && !entry.getValue().constructors
Copy link
Contributor

@zakkak zakkak Dec 6, 2022

Choose a reason for hiding this comment

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

@essobedo you still have the weak check in hasConstructorsToHandle. Why? If it is weak then we should immediately skip the tryBlock no matter if it hasMethodsToHandle etc., no?

Copy link
Contributor Author

@essobedo essobedo Dec 6, 2022

Choose a reason for hiding this comment

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

No, if you check the original code, you will see that tryBlock is needed if entry.getValue().serialization is true whatever the value of entry.getValue().weak

@quarkus-bot

This comment has been minimized.

@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from ff1eeb4 to aa2b78d Compare December 7, 2022 12:37
@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from e197c3f to b039562 Compare December 12, 2022 17:46
@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from b039562 to e043b10 Compare December 12, 2022 17:53
@essobedo
Copy link
Contributor Author

essobedo commented Dec 12, 2022

I just assumed that in Quarkus core we don't really want to have a dependency like Jakson but if it is not an issue for you, I can modify the code consequently. WDYT?

We don't need Jackson to generate a simpe json. We could just make this util class public.

But I'd really like to hear @zakkak's opinion because if I'm not mistaken he was working on a similar task.

@mkouba I've just proposed a 3rd approach that generates the JSON files directly in the format expected by GraalVM, except for the "weak reflection" that is more or less specific to Quarkus so I need to keep an internal format for it and a dedicated Feature to load and process it. Is it what you had in mind?

@quarkus-bot

This comment has been minimized.

@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from e043b10 to 25f8d59 Compare December 13, 2022 08:37
@quarkus-bot

This comment has been minimized.

@essobedo essobedo force-pushed the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch from 6c8ae50 to faa5949 Compare December 13, 2022 09:01
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 13, 2022

⚠️ Unable to include the stracktraces as the report was too long. See annotations below for the details.

Failing Jobs - Building faa5949

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs
JVM Tests - JDK 17 MacOS M1 Build Failures Logs Raw logs
JVM Tests - JDK 18 Build Failures Logs Raw logs
Native Tests - HTTP Build Failures Logs Raw logs
Native Tests - Messaging1 Build Failures Logs Raw logs
Native Tests - Misc3 Build Failures Logs Raw logs
Quickstarts Compilation - JDK 17 Compile Quickstarts Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.BasicJavaLibraryModuleTest.testBasicMultiModuleBuild line 25 - More details - Source on GitHub

io.quarkus.gradle.devmode.BasicJavaLibraryModuleDevModeTest.main line 23 - More details - Source on GitHub

📦 integration-tests/gradle/target/classes/basic-java-library-module/application

org.acme.ApplicationConfigResourceTest.testAppConfigEndpoint() - More details - Source on GitHub


⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.BasicJavaLibraryModuleTest.testBasicMultiModuleBuild line 25 - More details - Source on GitHub

io.quarkus.gradle.devmode.BasicJavaLibraryModuleDevModeTest.main line 23 - More details - Source on GitHub

📦 integration-tests/gradle/target/classes/basic-java-library-module/application

org.acme.ApplicationConfigResourceTest.testAppConfigEndpoint() - More details - Source on GitHub


⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/kubernetes-client integration-tests/kubernetes-client-devservices integration-tests/kubernetes/quarkus-standard-way and 1 more

📦 integration-tests/kubernetes-client

io.quarkus.it.kubernetes.client.ConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesNewClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerOnProfileTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.NamespacedConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.OpenShiftTestServerTest.testInjectionDefaultsToCrud - More details - Source on GitHub

io.quarkus.it.kubernetes.client.SecretPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

📦 integration-tests/kubernetes-client-devservices

io.quarkus.kubernetes.client.devservices.it.DevServicesKubernetesITest.shouldReturnAllKeys - More details - Source on GitHub

📦 integration-tests/kubernetes/quarkus-standard-way

io.quarkus.it.kubernetes.KnativeWithSecretConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesConfigWithSecretsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithMetricsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithRbacAndNamespaceTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.OpenshiftWithKubernetesConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndExistingResourcesTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndRbacDisabledTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientTest. - More details - Source on GitHub

📦 integration-tests/openshift-client

io.quarkus.it.openshift.client.OpenShiftClientTest.createRoute - More details - Source on GitHub


⚙️ JVM Tests - JDK 11 Windows #

- Failing: integration-tests/kubernetes-client integration-tests/kubernetes-client-devservices integration-tests/kubernetes/quarkus-standard-way and 1 more

📦 integration-tests/kubernetes-client

io.quarkus.it.kubernetes.client.ConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesNewClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerOnProfileTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.NamespacedConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.OpenShiftTestServerTest.testInjectionDefaultsToCrud - More details - Source on GitHub

io.quarkus.it.kubernetes.client.SecretPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

📦 integration-tests/kubernetes-client-devservices

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kubernetes-client-devservices: Failed to build quarkus application

📦 integration-tests/kubernetes/quarkus-standard-way

io.quarkus.it.kubernetes.KnativeWithSecretConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesConfigWithSecretsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithMetricsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithRbacAndNamespaceTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.OpenshiftWithKubernetesConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndExistingResourcesTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndRbacDisabledTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientTest. - More details - Source on GitHub

📦 integration-tests/openshift-client

io.quarkus.it.openshift.client.OpenShiftClientTest.createRoute - More details - Source on GitHub


⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/kubernetes-client integration-tests/kubernetes-client-devservices integration-tests/kubernetes/quarkus-standard-way and 1 more

📦 integration-tests/kubernetes-client

io.quarkus.it.kubernetes.client.ConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesNewClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerOnProfileTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.NamespacedConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.OpenShiftTestServerTest.testInjectionDefaultsToCrud - More details - Source on GitHub

io.quarkus.it.kubernetes.client.SecretPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

📦 integration-tests/kubernetes-client-devservices

io.quarkus.kubernetes.client.devservices.it.DevServicesKubernetesITest.shouldReturnAllKeys - More details - Source on GitHub

📦 integration-tests/kubernetes/quarkus-standard-way

io.quarkus.it.kubernetes.KnativeWithSecretConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesConfigWithSecretsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithMetricsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithRbacAndNamespaceTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.OpenshiftWithKubernetesConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndExistingResourcesTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndRbacDisabledTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientTest. - More details - Source on GitHub

📦 integration-tests/openshift-client

io.quarkus.it.openshift.client.OpenShiftClientTest.createRoute - More details - Source on GitHub


⚙️ JVM Tests - JDK 17 MacOS M1 #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment integration-tests/kubernetes-client integration-tests/kubernetes-client-devservices and 1 more
! Skipped: extensions/avro/deployment extensions/csrf-reactive/deployment extensions/grpc/deployment and 131 more

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment

io.quarkus.resteasy.reactive.server.test.RequestLeakDetectionTest.testWithConcurrentBlockingCalls line 70 - More details - Source on GitHub

📦 integration-tests/kubernetes-client

io.quarkus.it.kubernetes.client.ConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesNewClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerOnProfileTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.NamespacedConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.OpenShiftTestServerTest.testInjectionDefaultsToCrud - More details - Source on GitHub

io.quarkus.it.kubernetes.client.SecretPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

📦 integration-tests/kubernetes-client-devservices

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kubernetes-client-devservices: Failed to build quarkus application

📦 integration-tests/openshift-client

io.quarkus.it.openshift.client.OpenShiftClientTest.createRoute - More details - Source on GitHub


⚙️ JVM Tests - JDK 18 #

- Failing: integration-tests/kubernetes-client integration-tests/kubernetes-client-devservices integration-tests/kubernetes/quarkus-standard-way and 1 more

📦 integration-tests/kubernetes-client

io.quarkus.it.kubernetes.client.ConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesNewClientTest.testInteractionWithAPIServer - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerOnProfileTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.KubernetesTestServerTest.testConfiguration - More details - Source on GitHub

io.quarkus.it.kubernetes.client.NamespacedConfigMapPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

io.quarkus.it.kubernetes.client.OpenShiftTestServerTest.testInjectionDefaultsToCrud - More details - Source on GitHub

io.quarkus.it.kubernetes.client.SecretPropertiesTest.testPropertiesReadFromConfigMap - More details - Source on GitHub

📦 integration-tests/kubernetes-client-devservices

io.quarkus.kubernetes.client.devservices.it.DevServicesKubernetesITest.shouldReturnAllKeys - More details - Source on GitHub

📦 integration-tests/kubernetes/quarkus-standard-way

io.quarkus.it.kubernetes.KnativeWithSecretConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesConfigWithSecretsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithMetricsTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.KubernetesWithRbacAndNamespaceTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.OpenshiftWithKubernetesConfigTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndExistingResourcesTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientAndRbacDisabledTest. - More details - Source on GitHub

io.quarkus.it.kubernetes.WithKubernetesClientTest. - More details - Source on GitHub

📦 integration-tests/openshift-client

io.quarkus.it.openshift.client.OpenShiftClientTest.createRoute - More details - Source on GitHub


⚙️ Native Tests - HTTP #

- Failing: integration-tests/resteasy-reactive-kotlin/standard 

📦 integration-tests/resteasy-reactive-kotlin/standard

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-resteasy-reactive-kotlin-standard: Failed to build quarkus application


⚙️ Native Tests - Messaging1 #

- Failing: integration-tests/kafka integration-tests/kafka-avro integration-tests/kafka-avro-apicurio2 and 6 more

📦 integration-tests/kafka

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka: Failed to build quarkus application

📦 integration-tests/kafka-avro

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-avro: Failed to build quarkus application

📦 integration-tests/kafka-avro-apicurio2

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-avro-apicurio2: Failed to build quarkus application

📦 integration-tests/kafka-oauth-keycloak

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-oauth-keycloak: Failed to build quarkus application

📦 integration-tests/kafka-sasl

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-sasl: Failed to build quarkus application

📦 integration-tests/kafka-snappy

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-snappy: Failed to build quarkus application

📦 integration-tests/kafka-ssl

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-ssl: Failed to build quarkus application

📦 integration-tests/kafka-streams

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kafka-streams: Failed to build quarkus application

📦 integration-tests/reactive-messaging-kafka

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-reactive-messaging-kafka: Failed to build quarkus application


⚙️ Native Tests - Misc3 #

- Failing: integration-tests/kubernetes-client integration-tests/openshift-client integration-tests/smallrye-graphql and 1 more

📦 integration-tests/kubernetes-client

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-kubernetes-client: Failed to build quarkus application

📦 integration-tests/openshift-client

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-openshift-client: Failed to build quarkus application

📦 integration-tests/smallrye-graphql

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-smallrye-graphql: Failed to build quarkus application

📦 integration-tests/smallrye-graphql-client

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-smallrye-graphql-client: Failed to build quarkus application


⚙️ Quickstarts Compilation - JDK 17 #

- Failing: stork-kubernetes-quickstart 

📦 stork-kubernetes-quickstart

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project stork-kubernetes-quickstart: Failed to build quarkus application

@mkouba
Copy link
Contributor

mkouba commented Dec 13, 2022

I've just proposed a 3rd approach that generates the JSON files directly in the format expected by GraalVM, except for the "weak reflection" that is more or less specific to Quarkus so I need to keep an internal format for it and a dedicated Feature to load and process it. Is it what you had in mind?

Yes, something like this. I like this idea but I think that we need more eyes because it's an important change. CC @gsmet @geoand @zakkak @maxandersen.

There are a lot of test failures though. Could it be related?

@geoand
Copy link
Contributor

geoand commented Dec 13, 2022

Yes, something like this. I like this idea but I think that we need more eyes because it's an important change

I am pretty sure that @zakkak already has something in the works

@essobedo
Copy link
Contributor Author

Yes, something like this. I like this idea but I think that we need more eyes because it's an important change

I am pretty sure that @zakkak already has something in the works

Indeed, I can see that he is already working on it and his approach is even better so let's close this PR

@essobedo essobedo closed this Dec 13, 2022
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Dec 13, 2022
@essobedo essobedo deleted the 29693/fix-MethodTooLargeException-when-too-many-classes-to-register branch December 13, 2022 15:32
@zakkak
Copy link
Contributor

zakkak commented Dec 14, 2022

Hi folks, sorry for coming back to this late (and especially @essobedo for having you duplicating work) but I was very sick and couldn't even go though email.

I indeed have something in the works. It still needs some polishing and I need to confirm it doesn't register more things than before (not sure if the json API is more inclusive than the API). I will try to get it ready for review before the end of the year but I can't promise anything at this point.

@essobedo if this is pressing for you feel free to take my branch and work with it.

@essobedo
Copy link
Contributor Author

@essobedo if this is pressing for you feel free to take my branch and work with it.

@zakkak ok I take it over then, thx

@maxandersen
Copy link
Member

just so if others see this in future - generating json is not a complete solution for this. we should still try and make gizmo generation more efficient and smarter so we aren't reliant only on external json configuration imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MethodTooLargeException when too many classes to register for reflection
6 participants