Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .devcontainer/Dockerfile

This file was deleted.

15 changes: 10 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "GraalPy",
"build": { "dockerfile": "Dockerfile" },
"image": "mcr.microsoft.com/devcontainers/universal:linux",
"remoteEnv": {
"MX_GLOBAL_ENV": "${containerWorkspaceFolder}/.mxenv",
"MX_CACHE_DIR": "${containerWorkspaceFolder}/.mxcache",
"PATH": "${containerWorkspaceFolder}/.mx:${containerWorkspaceFolder}/.mx/labsjdk-ce-latest/bin:${containerEnv:PATH}"
},
"postCreateCommand": {
"hint": "echo 'GraalPy devcontainer ready. Run mx python-jvm if you need to build GraalPy for testing.'"
"install_packages": "sudo apt-get update && sudo apt-get install -y build-essential libffi-dev zlib1g-dev libbz2-dev cmake ninja-build",
"setup_mx": "bash \"${containerWorkspaceFolder}/.devcontainer/setup-mx.sh\" \"${containerWorkspaceFolder}\"",
"setup_jdtls": "bash \"${containerWorkspaceFolder}/.devcontainer/setup-jdtls.sh\" \"${containerWorkspaceFolder}\""
},
"hostRequirements": {
"cpus": 2,
Expand All @@ -11,11 +18,9 @@
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"zoma.vscode-auto-open-workspace"
"vscjava.vscode-java-pack"
],
"settings": {
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
"java.autobuild.enabled": false
}
},
Expand Down
52 changes: 52 additions & 0 deletions .devcontainer/setup-jdtls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# The Universal Permissive License (UPL), Version 1.0
#
# Subject to the condition set forth below, permission is hereby granted to any
# person obtaining a copy of this software, associated documentation and/or
# data (collectively the "Software"), free of charge and under any and all
# copyright rights in the Software, and any and all patent rights owned or
# freely licensable by each licensor hereunder covering either (i) the
# unmodified Software as contributed to or provided by such licensor, or (ii)
# the Larger Works (as defined below), to deal in both
#
# (a) the Software, and
#
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
# one is included with the Software each a "Larger Work" to which the Software
# is contributed by such licensors),
#
# without restriction, including without limitation the rights to copy, create
# derivative works of, display, perform, and distribute the Software and make,
# use, sell, offer for sale, import, export, have made, and have sold the
# Software and the Larger Work(s), and to sublicense the foregoing rights on
# either these or other terms.
#
# This license is subject to the following condition:
#
# The above copyright notice and either this complete permission notice or at a
# minimum a reference to the UPL must be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

#!/usr/bin/env bash

set -euo pipefail

JDTLS_SNAPSHOT_URL="https://download.eclipse.org/jdtls/snapshots"
DOWNLOAD_FILE=$(curl -s -L "${JDTLS_SNAPSHOT_URL}/latest.txt")
mkdir -p "/tmp/jdtls"
curl -s -L -o "/tmp/jdtls/${DOWNLOAD_FILE}" "${JDTLS_SNAPSHOT_URL}/${DOWNLOAD_FILE}"
cd /tmp/jdtls
tar xfz "/tmp/jdtls/${DOWNLOAD_FILE}"
rm "/tmp/jdtls/${DOWNLOAD_FILE}"
sudo mv "/tmp/jdtls" /opt
sudo ln -s /opt/jdtls/bin/jdtls /usr/local/bin/jdtls
67 changes: 67 additions & 0 deletions .devcontainer/setup-mx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# The Universal Permissive License (UPL), Version 1.0
#
# Subject to the condition set forth below, permission is hereby granted to any
# person obtaining a copy of this software, associated documentation and/or
# data (collectively the "Software"), free of charge and under any and all
# copyright rights in the Software, and any and all patent rights owned or
# freely licensable by each licensor hereunder covering either (i) the
# unmodified Software as contributed to or provided by such licensor, or (ii)
# the Larger Works (as defined below), to deal in both
#
# (a) the Software, and
#
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
# one is included with the Software each a "Larger Work" to which the Software
# is contributed by such licensors),
#
# without restriction, including without limitation the rights to copy, create
# derivative works of, display, perform, and distribute the Software and make,
# use, sell, offer for sale, import, export, have made, and have sold the
# Software and the Larger Work(s), and to sublicense the foregoing rights on
# either these or other terms.
#
# This license is subject to the following condition:
#
# The above copyright notice and either this complete permission notice or at a
# minimum a reference to the UPL must be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

#!/usr/bin/env bash

set -euo pipefail

repo_dir="${1:-$PWD}"
mx_dir="$repo_dir/.mx"
jdk_dir="$mx_dir/labsjdk-ce-latest"
bootstrap_cache="$repo_dir/.mx-bootstrap-cache"

if [[ ! -x "$mx_dir/mx" ]]; then
rm -rf "$mx_dir"
git clone https://github.com/graalvm/mx "$mx_dir"
fi

mkdir -p "$repo_dir/.mxcache"

if [[ ! -x "$jdk_dir/bin/java" ]]; then
MX_CACHE_DIR="$bootstrap_cache" "$mx_dir/mx" \
-p "$mx_dir" \
-y fetch-jdk \
-A \
--to "$mx_dir" \
--jdk-id labsjdk-ce-latest
rm -rf "$bootstrap_cache"
fi

printf 'JAVA_HOME=%s\n' "$jdk_dir" > "$repo_dir/.mxenv"
echo 'GraalPy devcontainer ready. Java editing works from the checked-in Maven POMs; run mx python-jvm for full builds and tests.'
7 changes: 3 additions & 4 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '.github/workflows/build-website.yml'
push:
branches:
- master
- 'release/graal-vm/**'
paths:
- 'docs/site/**'
- '.github/workflows/build-website.yml'
Expand Down Expand Up @@ -50,9 +50,8 @@ jobs:
path: docs/site/_site

deploy:
# The website should only be deployed from a release branch:
# if: startsWith(github.head_ref, 'release/graal-vm/')
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# Deploy only explicitly from the Actions tab.
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: build
environment:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ compile_commands.json
opencode.json
pyrightconfig.json
bench-results.json
/.mx/
/.mxcache/
/.mxenv
/.mx-bootstrap-cache/
10 changes: 5 additions & 5 deletions docs/contributor/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Please also take some time to review our [code of conduct](http://www.graalvm.or

### Using a Github codespace

The devcontainer we create sets up a code workspace on launch—the first time you launch the container, you will need a bit of patience.
Then, use the command palette or the File menu and select "Open Workspace from File" and select [/workspace/graalpython.code-workspace](../../../graalpython.code-workspace).
The VSCode window will reload and open GraalPy and all the related Java projects.
The devcontainer will use checked-in Maven POM facades, so basic Java editing works directly.
Use `mx python-jvm` to build, run, and test a GraalPy distribution artifact.
For full editing support, run `mx vscodeinit` and open the `graalpython.code-workspace` file that command generates.

### Setting up on your machine

Expand Down Expand Up @@ -63,9 +63,9 @@ This will generate configurations for Eclipse, IntelliJ, and NetBeans so that yo
See also the documentation in mx for [setting up your IDE](https://github.com/graalvm/mx/blob/master/docs/IDE.md).
If you use another editor (such as VSCode, Emacs, or Neovim) with support for the [Eclipse language server](https://github.com/eclipse/eclipse.jdt.ls) or [Apache NetBeans language server](https://marketplace.visualstudio.com/items?itemName=ASF.apache-netbeans-java), you can also get useable development setups with that, but it's not something we explicitly support.

The checked-in Maven POMs are lightweight facades for quick Java IDE import in editors such as Eclipse, VSCode, or Eglot/JDT-LS.
The checked-in Maven POMs are lightweight facades for quick Java IDE import in editors such as Eclipse, VSCode, or any editor using JDTLS.
They are not the full GraalPy build; use `mx ideinit` for the full generated IDE setup and `mx python-jvm` for the build needed to run or test GraalPy.
The facade uses a `graalvm.version` Maven range for the current release train so fresh checkouts resolve the newest available GraalVM artifacts; override `graalvm.version` locally to lock a specific version.
The facade uses the `graalvm.version` Maven property for GraalVM artifact resolution; override it locally if you need a different version.

## Development Layout

Expand Down
8 changes: 2 additions & 6 deletions docs/site/01-jvm-developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ audience_identifier: jvm
{%- highlight java -%}
import org.graalvm.polyglot.Context;

try (Context context = Context.newBuilder()
.allowAllAccess(true) // See documentation for options
.build()) {
try (Context context = Context.newBuilder().build()) {
context.eval("python", "print('Hello from GraalPy!')");
}
{%- endhighlight -%}
Expand Down Expand Up @@ -131,9 +129,7 @@ dependencies {
{%- highlight java -%}
import org.graalvm.polyglot.Context;

try (Context context = Context.newBuilder()
.allowAllAccess(true) // See documentation for options
.build()) {
try (Context context = Context.newBuilder().build()) {
context.eval("python", "print('Hello from GraalPy!')");
}
{%- endhighlight -%}
Expand Down
4 changes: 1 addition & 3 deletions docs/site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ layout: base
{%- highlight java -%}
import org.graalvm.polyglot.Context;

try (Context context = Context.newBuilder()
.allowAllAccess(true) // See documentation for options
.build()) {
try (Context context = Context.newBuilder().build()) {
context.eval("python", "print('Hello from GraalPy!')");
}
{%- endhighlight -%}
Expand Down
2 changes: 1 addition & 1 deletion mx.graalpython/mx_pominit.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
LOCAL_GROUP_ID = "${project.groupId}"
LOCAL_VERSION = "${project.version}"
GRAALVM_VERSION = "${graalvm.version}"
DEFAULT_GRAALVM_VERSION = "25.2.0"
DEFAULT_GRAALVM_VERSION = "25.0.0"
CURRENT_GRAALVM_VERSION = "25.1.0"

XML_UPL_HEADER = """<!--
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SOFTWARE.
<maven.deploy.skip>true</maven.deploy.skip>
<maven.compiler-plugin.version>3.14.1</maven.compiler-plugin.version>
<maven.enforcer-plugin.version>3.6.1</maven.enforcer-plugin.version>
<graalvm.version>25.2.0</graalvm.version>
<graalvm.version>25.0.0</graalvm.version>
</properties>

<dependencyManagement>
Expand Down
Loading