Skip to content

Commit 8e9e2b0

Browse files
committed
chore: update graalvm → 24.2.x
Signed-off-by: Sam Gammon <sam@elide.dev>
1 parent 9cbba51 commit 8e9e2b0

File tree

7 files changed

+51
-18
lines changed

7 files changed

+51
-18
lines changed

gradle/elide.versions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ github-api = "1.326"
6565
google-api-common = "2.43.0"
6666
google-html-types = "1.0.8"
6767
gr8 = "0.11.2"
68-
graalvm = "24.1.2"
68+
graalvm = "24.2.0"
6969
graalvm-metadata = "0.3.16"
70-
graalvm-pin = "24.1.2"
70+
graalvm-pin = "24.2.0"
7171
graalvm-plugin = "0.10.6"
72-
graalvm-stable = "24.1.2"
73-
graalvm-svm-driver = "24.1.2"
72+
graalvm-stable = "24.2.0"
73+
graalvm-svm-driver = "24.2.0"
7474
gradleChecksum = "1.4.0"
7575
gradleCommonCustomUserData = "2.1"
7676
gradleTestRetry = "1.6.2"

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/graalvm-py/src/main/kotlin/elide/runtime/plugins/python/Python.kt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package elide.runtime.plugins.python
1616
import com.oracle.graal.python.PythonLanguage
1717
import org.graalvm.nativeimage.ImageInfo
1818
import org.graalvm.polyglot.io.FileSystem
19+
import org.graalvm.python.embedding.GraalPythonFilesystem
1920
import java.nio.file.Path
2021
import elide.runtime.core.DelicateElideApi
2122
import elide.runtime.core.EngineLifecycleEvent.ContextCreated
@@ -32,6 +33,9 @@ import elide.runtime.plugins.AbstractLanguagePlugin.LanguagePluginManifest
3233
import elide.runtime.vfs.LanguageVFS.LanguageVFSInfo
3334
import elide.runtime.vfs.registerLanguageVfs
3435

36+
// Whether to enable the Python VFS.
37+
private const val ENABLE_PYTHON_VFS = false
38+
3539
// Paths to prepend to Python's path before user-added paths, and after the system path.
3640
private val BUILTIN_PYTHON_PATHS = listOf(
3741
"./__runtime__/python", // prefix for injected built-in modules ("Elide modules")
@@ -126,16 +130,16 @@ private val BUILTIN_PYTHON_PATHS = listOf(
126130
override val key: Key<Python> = Key(PYTHON_PLUGIN_ID)
127131

128132
init {
129-
registerLanguageVfs(PYTHON_LANGUAGE_ID) {
130-
object : LanguageVFSInfo {
131-
override val router: (Path) -> Boolean get() = { path ->
132-
path.toString().startsWith("<frozen ")
133-
}
134-
135-
override val fsProvider: () -> FileSystem get() = {
136-
org.graalvm.python.embedding.utils.VirtualFileSystem
137-
.newBuilder()
138-
.build()
133+
if (ENABLE_PYTHON_VFS) {
134+
registerLanguageVfs(PYTHON_LANGUAGE_ID) {
135+
object : LanguageVFSInfo {
136+
override val router: (Path) -> Boolean get() = { path ->
137+
path.toString().startsWith("<frozen ")
138+
}
139+
140+
override val fsProvider: () -> FileSystem get() = {
141+
GraalPythonFilesystem.delegate()
142+
}
139143
}
140144
}
141145
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2024 Elide Technologies, Inc.
3+
*
4+
* Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
* with the License. You may obtain a copy of the License at
6+
*
7+
* https://opensource.org/license/mit/
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
* License for the specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package org.graalvm.python.embedding
15+
16+
import com.oracle.graal.python.resources.PythonResource
17+
import org.graalvm.polyglot.io.FileSystem
18+
19+
// Exposes GraalPython's filesystem so it can be delegated within Elide.
20+
public object GraalPythonFilesystem {
21+
private val vfs = VirtualFileSystem
22+
.newBuilder()
23+
.allowHostIO(VirtualFileSystem.HostIO.READ)
24+
.caseInsensitive(false)
25+
.resourceLoadingClass(PythonResource::class.java)
26+
.build()
27+
28+
public fun delegate(): FileSystem = vfs.delegatingFileSystem
29+
}
576 KB
Binary file not shown.

tools/elide-build/src/main/kotlin/elide/internal/conventions/Constants.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public object Constants {
147147
const val OKIO = "3.10.2"
148148

149149
/** GraalVM version. */
150-
const val GRAALVM = "24.1.2"
150+
const val GRAALVM = "24.2.0"
151151
}
152152

153153
/** Kotlin conventions. */

tools/elide-build/src/main/kotlin/elide/internal/conventions/tests/TestConventions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ internal fun Project.configureTestLogger() {
8080
// use mocha-themed output
8181
theme = ThemeType.MOCHA_PARALLEL
8282

83-
val testExceptions = System.getenv("TEST_EXCEPTIONS") != null
84-
val testVerbose = System.getenv("TEST_VERBOSE") != null
83+
val testExceptions = isCI || System.getenv("TEST_EXCEPTIONS") != null
84+
val testVerbose = isCI || System.getenv("TEST_VERBOSE") != null
8585
val testLogs = System.getenv("TEST_LOGS") != null
8686

8787
// only show errors if specified in the environment

0 commit comments

Comments
 (0)