Skip to content

Commit

Permalink
Use an older version of shardingsphere-infra-util in Espresso's Truff…
Browse files Browse the repository at this point in the history
…le context
  • Loading branch information
linghengqian committed Jan 31, 2023
1 parent 97fb157 commit 1ec235c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions distribution/proxy-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<id>native</id>
<properties>
<hikari-cp.version>5.0.1</hikari-cp.version>
<truffle-api.version>22.3.1</truffle-api.version>
</properties>
<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion distribution/proxy-native/src/main/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,4 @@ UPL licenses
The following components are provided under the UPL License. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.

truffle-api 21.2.0: http://www.graalvm.org/, UPL
truffle-api 22.3.1: http://www.graalvm.org/, UPL
8 changes: 4 additions & 4 deletions infra/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@
<goals>
<goal>copy</goal>
</goals>
<phase>package</phase>
<phase>process-test-classes</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-infra-util-groovy</artifactId>
<version>${project.version}</version>
<artifactId>shardingsphere-infra-util</artifactId>
<version>5.3.1</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>shardingsphere-infra-util-groovy.jar</destFileName>
<destFileName>shardingsphere-infra-util.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.apache.groovy</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.shardingsphere.infra.util.expr;

import groovy.lang.Closure;
import org.apache.shardingsphere.infra.util.groovy.expr.HotspotInlineExpressionParser;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.Value;

Expand Down Expand Up @@ -48,7 +47,7 @@ public class EspressoInlineExpressionParser {
URL resource = Thread.currentThread().getContextClassLoader().getResource("espresso-need-libs");
assert null != resource;
String dir = resource.getPath();
String javaClasspath = String.join(":", dir + "/groovy.jar", dir + "/guava.jar", dir + "/shardingsphere-infra-util-groovy.jar");
String javaClasspath = String.join(":", dir + "/groovy.jar", dir + "/guava.jar", dir + "/shardingsphere-infra-util.jar");
POLYGLOT = Context.newBuilder().allowAllAccess(true)
.option("java.MultiThreaded", "true")
.option("java.Classpath", javaClasspath)
Expand All @@ -57,7 +56,7 @@ public class EspressoInlineExpressionParser {

public EspressoInlineExpressionParser(final String inlineExpression) {
espressoInlineExpressionParser = POLYGLOT.getBindings("java")
.getMember(HotspotInlineExpressionParser.class.getName())
.getMember("org.apache.shardingsphere.infra.util.expr.InlineExpressionParser")
.newInstance(inlineExpression);
}

Expand All @@ -69,7 +68,7 @@ public EspressoInlineExpressionParser(final String inlineExpression) {
*/
public static String handlePlaceHolder(final String inlineExpression) {
return POLYGLOT.getBindings("java")
.getMember(HotspotInlineExpressionParser.class.getName())
.getMember("org.apache.shardingsphere.infra.util.expr.InlineExpressionParser")
.invokeMember("handlePlaceHolder", inlineExpression)
.as(String.class);
}
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,9 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<excludes>**/*.jar</excludes>
</configuration>
<executions>
<execution>
<goals>
Expand Down

0 comments on commit 1ec235c

Please sign in to comment.