You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "essobedo (via GitHub)" <gi...@apache.org> on 2023/02/09 10:20:11 UTC
[GitHub] [camel-quarkus] essobedo opened a new pull request, #4542: Ref #4523/#4443: Get rid of jOOR workarounds used for native mode
essobedo opened a new pull request, #4542:
URL: https://github.com/apache/camel-quarkus/pull/4542
fixes #4523 #4443
## Motivation
The integration test of the Java jOOR DSL fails when using the native mode and needs to be fixed. It is also a good opportunity to clean up the code that is related to jOOR allowed by the Camel upgrade.
## Modifications:
* Re-add the missing substitute `SubstituteJavaRoutesBuilderLoader` to fix the failing test
* Remove all the workarounds used for native to clean up the code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #4542: Ref #4523/#4443: Get rid of jOOR workarounds used for native mode
Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on code in PR #4542:
URL: https://github.com/apache/camel-quarkus/pull/4542#discussion_r1101395947
##########
extensions/java-joor-dsl/runtime/src/main/java/org/apache/camel/quarkus/dsl/java/joor/runtime/graal/SubstituteJavaRoutesBuilderLoader.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.dsl.java.joor.runtime.graal;
+
+import java.util.Collection;
+import java.util.List;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader;
+import org.apache.camel.spi.Resource;
+
+@TargetClass(JavaRoutesBuilderLoader.class)
Review Comment:
Is there any plan to eliminate this substitution? It can perhaps become configurable in Camel, e.g. via SPI, or CDI to provide our own implementation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] essobedo commented on a diff in pull request #4542: Ref #4523/#4443: Get rid of jOOR workarounds used for native mode
Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4542:
URL: https://github.com/apache/camel-quarkus/pull/4542#discussion_r1101471436
##########
extensions/java-joor-dsl/runtime/src/main/java/org/apache/camel/quarkus/dsl/java/joor/runtime/graal/SubstituteJavaRoutesBuilderLoader.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.dsl.java.joor.runtime.graal;
+
+import java.util.Collection;
+import java.util.List;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader;
+import org.apache.camel.spi.Resource;
+
+@TargetClass(JavaRoutesBuilderLoader.class)
Review Comment:
TBH not yet, I still need to figure out what could be the best trade-off, because If I bring too much complexity in Camel just to avoid having to maintain a very simple class in Camel Quarkus, IMHO it doesn't make much sense. I understand that a substitution should be a temporary workaround but here there is no logic to maintain, only an empty method, the only thing that could eventually change is the signature of the method. Don't you agree?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] essobedo commented on pull request #4542: Ref #4523/#4443: Get rid of jOOR workarounds used for native mode
Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4542:
URL: https://github.com/apache/camel-quarkus/pull/4542#issuecomment-1424183598
The failing test is not related to this PR as it fails on other PRs too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] essobedo merged pull request #4542: Ref #4523/#4443: Get rid of jOOR workarounds used for native mode
Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo merged PR #4542:
URL: https://github.com/apache/camel-quarkus/pull/4542
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org