Skip to content

Commit ae9c85f

Browse files
committed
Update guava and jimfs dependencies and shade them
1 parent 9983362 commit ae9c85f

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

web-image/mx.web-image/suite.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@
6363
},
6464
# virtual file system that substitutes NIO and IO
6565
"JIMFS_BFS": {
66-
"digest": "sha512:dac2d913bcae2ed216c6fd0658a9b3d080741d5d512133834d727ba41e1a1a013574885c9d21d27594246faf361a45c5af8b7883e6f1ce34843e59b9e181a565",
67-
"sourceDigest": "sha512:409570c18b01ea29f8c3ac656cf9f1f3540c71d64d26f7a02ff906227eec9d2797643904b003f13bbe86d2e75ed954a5a816984db915e987724bed2b4ce56e68",
66+
"digest": "sha512:eabab57f753aa904f2734f5228ed8fe3e0ee2290aa4e898e5fcb193aed496258477d43c80efb5fc1ca3ccebb43b7c67f3488b4d118abe5fc6f337a689a7a1f87",
67+
"sourceDigest": "sha512:65e298d6bdd1288687047256fb117513927d373f3ad2caf8d057e27204d401bcae99b2ecc2a9ea71dbeea9f549f5d2a10c3cecaa0e6f1a77ab7d993b7f4ad450",
6868
"urlbase": "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/web-image",
69-
"urls": ["{urlbase}/jimfs-1.2-oracle-00001.jar"],
70-
"sourceUrls": ["{urlbase}/jimfs-1.2-oracle-00001-sources.jar"],
69+
"urls": ["{urlbase}/jimfs-1.3.0-c7a51a6e2109ff7e391815ba34ad404ac8a375c6-shaded.jar"],
70+
"sourceUrls": ["{urlbase}/jimfs-1.3.0-c7a51a6e2109ff7e391815ba34ad404ac8a375c6-shaded-sources.jar"],
7171
"dependencies": ["GUAVA_BFS"],
7272
},
7373
# Dependency of JIMFS
7474
"GUAVA_BFS": {
75-
"digest": "sha512:02afa0937235a5dab09957a33bf6ce0461419e7e3e11f76a1fe5f0a3d44a54dabdfc2c3097a2970becec889bb30bd3b27f26fe7c83d38a365ba792dea495ea40",
76-
"sourceDigest": "sha512:1b2090bf9a5943cbe1c76759042146cec4290ae7e71a24122dfa0a81da59072195d6610adf4514b54b047bb6d4394254017babf06a8cd351f57375366b320c04",
75+
"digest": "sha512:464ba85eaa87fbd5330522e71dad1eee09d8a320b3ebbee9008e529279eac6553460b195aa6fc834c04c6eccbcd7bcfe56f7635a6a6edae4357e915c9b42709f",
76+
"sourceDigest": "sha512:111acb5e2f9c20dfb99656b9f72344c30bc0e453449f47ba9c57bcec2e0cf919860bf20eae10ef9dbb0f59908bdb4c23473532a420059db2e6bb377b5c07989b",
7777
"urlbase": "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/web-image",
78-
"urls": ["{urlbase}/guava-31.0.1-jre-oracle-00001.jar"],
79-
"sourceUrls": ["{urlbase}/guava-31.0.1-jre-oracle-00001-sources.jar"],
78+
"urls": ["{urlbase}/guava-33.4.8-jre-shaded.jar"],
79+
"sourceUrls": ["{urlbase}/guava-33.4.8-jre-shaded-sources.jar"],
8080
},
8181
},
8282
# ------------- Projects -------------
@@ -430,7 +430,7 @@
430430
"org.graalvm.wrapped.google.guava",
431431
],
432432
"exports": [
433-
"com.google.common.jimfs to org.graalvm.extraimage.builder, com.oracle.svm.extraimage_enterprise",
433+
"org.graalvm.shadowed.com.google.common.jimfs to org.graalvm.extraimage.builder, com.oracle.svm.extraimage_enterprise",
434434
],
435435
},
436436
"javaCompliance": "17+",
@@ -447,7 +447,7 @@
447447
"java.logging",
448448
],
449449
"exports": [
450-
"com.google.common.* to org.graalvm.wrapped.google.jimfs",
450+
"org.graalvm.shadowed.com.google.common.* to org.graalvm.wrapped.google.jimfs",
451451
],
452452
},
453453
"javaCompliance": "17+",

web-image/src/com.oracle.svm.hosted.webimage/src/com/oracle/svm/hosted/webimage/WebImageFeature.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
172172
}
173173

174174
// SystemJimfsFileSystemProvider uses reflection to look up and call this method
175-
RuntimeReflection.register(ReflectionUtil.lookupMethod(ReflectionUtil.lookupClass("com.google.common.jimfs.JimfsFileSystem"), "toPath", URI.class));
175+
RuntimeReflection.register(ReflectionUtil.lookupMethod(ReflectionUtil.lookupClass("org.graalvm.shadowed.com.google.common.jimfs.JimfsFileSystem"), "toPath", URI.class));
176176

177177
/*
178178
* The constructors of these classes are package-private to prevent user code from creating
@@ -281,17 +281,17 @@ public void afterRegistration(AfterRegistrationAccess access) {
281281

282282
// This class gets initialized, causing the "unintentionally initialized at build time"
283283
// error. The initializer is simple and does not depend on other classes, so just allow it.
284-
rci.initializeAtBuildTime("com.google.common.jimfs.SystemJimfsFileSystemProvider", "service provider");
285-
rci.initializeAtBuildTime("com.google.common.collect.MapMakerInternalMap", "service provider");
286-
rci.initializeAtBuildTime("com.google.common.collect.MapMakerInternalMap$1", "service provider");
287-
rci.initializeAtBuildTime("com.google.common.collect.MapMakerInternalMap$EntrySet", "service provider");
288-
rci.initializeAtBuildTime("com.google.common.collect.MapMakerInternalMap$StrongKeyWeakValueSegment", "service provider");
289-
rci.initializeAtBuildTime("com.google.common.collect.MapMakerInternalMap$StrongKeyWeakValueEntry$Helper", "service provider");
290-
rci.initializeAtBuildTime("com.google.common.base.Equivalence$Equals", "service provider");
284+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.jimfs.SystemJimfsFileSystemProvider", "service provider");
285+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.collect.MapMakerInternalMap", "service provider");
286+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.collect.MapMakerInternalMap$1", "service provider");
287+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.collect.MapMakerInternalMap$EntrySet", "service provider");
288+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.collect.MapMakerInternalMap$StrongKeyWeakValueSegment", "service provider");
289+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.collect.MapMakerInternalMap$StrongKeyWeakValueEntry$Helper", "service provider");
290+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.base.Equivalence$Equals", "service provider");
291291

292292
// Initializing this class at build-time helps in determining the type of its static field
293293
// "systemProvider", which is necessary to compile some reflective accesses to the object.
294-
rci.initializeAtBuildTime("com.google.common.jimfs.Jimfs", "looks for service provider");
294+
rci.initializeAtBuildTime("org.graalvm.shadowed.com.google.common.jimfs.Jimfs", "looks for service provider");
295295

296296
rci.initializeAtRunTime(WebImageTempFileHelper.class, "instances of Random are not allowed in the image heap");
297297
rci.initializeAtRunTime(WebImageFileSystem.class, "Static fields need to read system properties at runtime");

web-image/src/com.oracle.svm.webimage/src/com/oracle/svm/webimage/fs/FileSystemInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
import java.nio.file.Files;
3131

3232
import org.graalvm.nativeimage.Platform;
33+
import org.graalvm.shadowed.com.google.common.jimfs.Configuration;
34+
import org.graalvm.shadowed.com.google.common.jimfs.Jimfs;
3335
import org.graalvm.webimage.api.JS;
3436
import org.graalvm.webimage.api.JSNumber;
3537
import org.graalvm.webimage.api.JSObject;
3638
import org.graalvm.webimage.api.JSString;
3739

38-
import com.google.common.jimfs.Configuration;
39-
import com.google.common.jimfs.Jimfs;
4040
import com.oracle.svm.webimage.platform.WebImageWasmGCPlatform;
4141
import com.oracle.svm.webimage.platform.WebImageWasmLMPlatform;
4242

web-image/src/com.oracle.svm.webimage/src/com/oracle/svm/webimage/fs/WebImageNIOFileSystemProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
package com.oracle.svm.webimage.fs;
2727

28+
import org.graalvm.shadowed.com.google.common.jimfs.Jimfs;
29+
2830
import java.io.IOException;
2931
import java.net.URI;
3032
import java.net.URISyntaxException;
@@ -46,8 +48,6 @@
4648
import java.util.Map;
4749
import java.util.Set;
4850

49-
import com.google.common.jimfs.Jimfs;
50-
5151
/**
5252
* Implementation for the default Java NIO {@link FileSystemProvider} for the {@code file} scheme.
5353
* <p>

web-image/src/com.oracle.svm.webimage/src/com/oracle/svm/webimage/substitute/system/WebImageIOSubstitutions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public class WebImageIOSubstitutions {
7272
* That code is never executed (unless we explicitly request that path normalization), but still
7373
* makes ICU4J reachable in the analysis.
7474
*/
75-
@TargetClass(className = "com.google.common.jimfs.PathNormalization$4")
76-
final class Target_com_google_common_jimfs_PathNormalization_4 {
75+
@TargetClass(className = "org.graalvm.shadowed.com.google.common.jimfs.PathNormalization$4")
76+
final class Target_org_graalvm_shadowed_com_google_common_jimfs_PathNormalization_4 {
7777

7878
@SuppressWarnings({"static-method", "unused"})
7979
@Substitute
@@ -82,8 +82,8 @@ public String apply(String string) {
8282
}
8383
}
8484

85-
@TargetClass(className = "com.google.common.jimfs.JimfsPath")
86-
final class Target_com_google_common_jimfs_JimfsPath {
85+
@TargetClass(className = "org.graalvm.shadowed.com.google.common.jimfs.JimfsPath")
86+
final class Target_org_graalvm_shadowed_com_google_common_jimfs_JimfsPath {
8787

8888
@SuppressWarnings({"static-method", "unused"})
8989
@Substitute

0 commit comments

Comments
 (0)