-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Safe Composition of Metadata for ShardingSphere Proxy Native
- Loading branch information
1 parent
cc62f5f
commit d4cd0ac
Showing
41 changed files
with
2,351 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,9 +251,10 @@ Caused by: java.io.UnsupportedEncodingException: Codepage Cp1252 is not supporte | |
```json | ||
[ | ||
{ | ||
"condition":{"typeReachable":"com.mysql.cj.jdbc.MysqlXADataSource"}, | ||
"name":"com.mysql.cj.jdbc.MysqlXADataSource", | ||
"allDeclaredConstructors": true | ||
"condition":{"typeReachable":"com.mysql.cj.jdbc.MysqlXADataSource"}, | ||
"name":"com.mysql.cj.jdbc.MysqlXADataSource", | ||
"allPublicMethods": true, | ||
"methods": [{"name":"<init>","parameterTypes":[] }] | ||
} | ||
] | ||
``` | ||
|
@@ -484,7 +485,7 @@ sudo apt-get install build-essential zlib1g-dev -y | |
git clone [email protected]:apache/shardingsphere.git | ||
cd ./shardingsphere/ | ||
./mvnw -PnativeTestInShardingSphere -e clean test | ||
./mvnw -PnativeTestInShardingSphere -e -T 1C clean test | ||
``` | ||
|
||
当贡献者发现缺少与 ShardingSphere 无关的第三方库的 GraalVM Reachability Metadata 时,应当在 | ||
|
@@ -513,10 +514,5 @@ Reachability Metadata 位于 `shardingsphere-infra-reachability-metadata` 子模 | |
```bash | ||
git clone [email protected]:apache/shardingsphere.git | ||
cd ./shardingsphere/ | ||
./mvnw -PgenerateMetadata -DskipNativeTests -e clean test native:metadata-copy | ||
./mvnw -PgenerateMetadata -DskipNativeTests -e -T 1C clean test native:metadata-copy | ||
``` | ||
|
||
在使用 GraalVM Native Build Tools 的 Maven Plugin 时, | ||
贡献者应避免使用 Maven 的并行构建功能。 | ||
GraalVM Native Build Tools 的 Maven Plugin并不是线程安全的, | ||
它与 https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3 不兼容。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,9 +264,10 @@ to define the constructor of `com.mysql.cj.jdbc.MysqlXADataSource` inside the Gr | |
```json | ||
[ | ||
{ | ||
"condition":{"typeReachable":"com.mysql.cj.jdbc.MysqlXADataSource"}, | ||
"name":"com.mysql.cj.jdbc.MysqlXADataSource", | ||
"allDeclaredConstructors": true | ||
"condition":{"typeReachable":"com.mysql.cj.jdbc.MysqlXADataSource"}, | ||
"name":"com.mysql.cj.jdbc.MysqlXADataSource", | ||
"allPublicMethods": true, | ||
"methods": [{"name":"<init>","parameterTypes":[] }] | ||
} | ||
] | ||
``` | ||
|
@@ -502,7 +503,7 @@ sudo apt-get install build-essential zlib1g-dev -y | |
git clone [email protected]:apache/shardingsphere.git | ||
cd ./shardingsphere/ | ||
./mvnw -PnativeTestInShardingSphere -e clean test | ||
./mvnw -PnativeTestInShardingSphere -e -T 1C clean test | ||
``` | ||
|
||
When contributors discover that GraalVM Reachability Metadata is missing for a third-party library not related to ShardingSphere, | ||
|
@@ -532,8 +533,5 @@ contributors should place it on the classpath of the `shardingsphere-test-native | |
```bash | ||
git clone [email protected]:apache/shardingsphere.git | ||
cd ./shardingsphere/ | ||
./mvnw -PgenerateMetadata -DskipNativeTests -e clean test native:metadata-copy | ||
./mvnw -PgenerateMetadata -DskipNativeTests -e -T 1C clean test native:metadata-copy | ||
``` | ||
|
||
Contributors should avoid using Maven's parallel builds feature when using the Maven Plugin for GraalVM Native Build Tools. | ||
The Maven Plugin for GraalVM Native Build Tools is not thread-safe and is incompatible with https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...data/src/main/resources/META-INF/native-image/com.alibaba/druid/1.2.7/reflect-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[ | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.mock.MockDriver"}, | ||
"name":"com.alibaba.druid.mock.MockDriver", | ||
"queryAllPublicConstructors":true | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.mock.MockDriver"}, | ||
"name":"com.alibaba.druid.mock.MockDriverMBean", | ||
"queryAllPublicMethods":true | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.proxy.DruidDriver"}, | ||
"name":"com.alibaba.druid.proxy.DruidDriver", | ||
"queryAllPublicConstructors":true | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.proxy.DruidDriver"}, | ||
"name":"com.alibaba.druid.proxy.DruidDriverMBean", | ||
"queryAllPublicMethods":true | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.LogFactory"}, | ||
"name":"com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.Resources"}, | ||
"name":"com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl" | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.LogFactory"}, | ||
"name":"com.alibaba.druid.support.logging.Jdk14LoggingImpl", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.Resources"}, | ||
"name":"com.alibaba.druid.support.logging.Jdk14LoggingImpl" | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.LogFactory"}, | ||
"name":"com.alibaba.druid.support.logging.NoLoggingImpl", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.LogFactory"}, | ||
"name":"com.alibaba.druid.support.logging.SLF4JImpl", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"condition":{"typeReachable":"com.alibaba.druid.support.logging.Resources"}, | ||
"name":"com.alibaba.druid.support.logging.SLF4JImpl" | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...ata/src/main/resources/META-INF/native-image/com.alibaba/druid/1.2.7/resource-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"resources":{ | ||
"includes":[{ | ||
"condition":{"typeReachable":"com.alibaba.druid.util.JdbcUtils"}, | ||
"pattern":"\\QMETA-INF/druid-driver.properties\\E" | ||
}]}, | ||
"bundles":[] | ||
} |
8 changes: 0 additions & 8 deletions
8
...main/resources/META-INF/native-image/com.atomikos/transactions/6.0.0/resource-config.json
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...es/META-INF/native-image/com.github.docker-java/docker-java-api/3.3.6/reflect-config.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.