jiayuasu commented on code in PR #3138:
URL: https://github.com/apache/sedona/pull/3138#discussion_r3625556527
##########
pom.xml:
##########
@@ -76,8 +76,8 @@
<jts2geojson.version>0.16.1</jts2geojson.version>
<spatial4j.version>0.8</spatial4j.version>
- <jt-jiffle.version>1.1.24</jt-jiffle.version>
- <janino-version>3.1.9</janino-version>
+ <jt-jiffle.version>1.1.31</jt-jiffle.version>
+ <janino-version>3.1.12</janino-version>
Review Comment:
Could we also transform Janino's service metadata in the common-module
shade? Version 3.1.12 adds a Java SPI descriptor, and it looks like it is
copied unchanged even though the implementation is relocated.
Repro:
```bash
mvn -pl common -DskipTests package
unzip -p common/target/sedona-common-1.9.1-SNAPSHOT.jar \
META-INF/services/org.codehaus.commons.compiler.ICompilerFactory
javap -classpath common/target/sedona-common-1.9.1-SNAPSHOT.jar \
org.codehaus.janino.CompilerFactory
javap -classpath common/target/sedona-common-1.9.1-SNAPSHOT.jar \
org.apache.sedona.shaded.codehaus.janino.CompilerFactory
```
The descriptor prints `org.codehaus.janino.CompilerFactory`; the unshaded
class is missing, while the relocated class exists. I also tried
`CompilerFactoryFactory.getDefaultCompilerFactory()` with `commons-compiler`
3.1.12 and its valid `commons-compiler-jdk` provider: the base Sedona jar
selected `org.codehaus.commons.compiler.jdk.CompilerFactory`, while this jar
raised `ServiceConfigurationError: Provider org.codehaus.janino.CompilerFactory
not found`.
I think adding a `ServicesResourceTransformer` to the common-module shade
execution would keep the descriptor aligned with the relocated classes.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]