Skip to content

Commit a0d029f

Browse files
rcosta358codex
andcommitted
Track playground LiquidJava upgrades with Dependabot
Co-authored-by: Codex <codex@openai.com>
1 parent 52258b1 commit a0d029f

5 files changed

Lines changed: 77 additions & 17 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: /scripts/playground
5+
schedule:
6+
interval: daily
7+
allow:
8+
- dependency-name: io.github.liquid-java:liquidjava-verifier
9+
- dependency-name: io.github.liquid-java:liquidjava-api

‎.github/workflows/pages.yml‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
name: Deploy Jekyll site to Pages
1+
name: Build and deploy Jekyll site
22

33
on:
44
push:
55
branches:
66
- main
7+
pull_request:
78
workflow_dispatch:
89

910
permissions:
1011
contents: read
11-
pages: write
12-
id-token: write
1312

1413
concurrency:
15-
group: "pages"
14+
group: pages-${{ github.event.pull_request.number || 'deploy' }}
1615
cancel-in-progress: true
1716

1817
jobs:
@@ -46,24 +45,29 @@ jobs:
4645
npm run build:playground
4746
npm run test:playground
4847
49-
- name: Setup Pages
50-
uses: actions/configure-pages@v5
51-
5248
- name: Build site
5349
run: bundle exec jekyll build
5450

5551
- name: Upload artifact
52+
if: github.event_name != 'pull_request'
5653
uses: actions/upload-pages-artifact@v3
5754
with:
5855
path: ./_site
5956

6057
deploy:
58+
if: github.event_name != 'pull_request'
59+
permissions:
60+
pages: write
61+
id-token: write
6162
environment:
6263
name: github-pages
6364
url: ${{ steps.deployment.outputs.page_url }}
6465
runs-on: ubuntu-latest
6566
needs: build
6667
steps:
68+
- name: Setup Pages
69+
uses: actions/configure-pages@v5
70+
6771
- name: Deploy to GitHub Pages
6872
id: deployment
6973
uses: actions/deploy-pages@v4

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ npm run test:playground
4646
bundle exec jekyll build
4747
```
4848

49-
The build requires JDK 17, Python 3, Node.js, and access to Maven Central. It recompiles the published verifier 0.0.35 and annotation API 0.0.7 sources for Java 17 without changing them, packages their dependencies, and adds the docs-owned runner and Z3 loader. The standard-library classpath comes from the build JDK's `java.base.jmod`. Generated runtime files are ignored by Git and included in the Pages artifact. The normal Pages workflow builds everything automatically.
49+
The build requires JDK 17, Python 3, Node.js, and access to Maven Central. It recompiles the published verifier and annotation API sources for Java 17 without changing them, packages their dependencies, and adds the docs-owned runner and Z3 loader. `scripts/playground/pom.xml` is the single source of truth for the Maven artifact versions; the Python build reads it directly, without requiring Maven. The verifier binary and sources always use the same version. The standard-library classpath comes from the build JDK's `java.base.jmod`. Generated runtime files are ignored by Git and included in the Pages artifact.
50+
51+
After the configuration is merged into `main`, Dependabot checks the manifest daily and opens update PRs for the LiquidJava verifier and annotation API. Every pull request builds the playground, runs its tests, and builds Jekyll. Review upgrades with browser verification before merging, including successful and failing refinements and typestate transitions. Pages deployment runs only after a push to `main` or a manual workflow run.
5052

5153
The browser package also adapts Spoon 10.4.2's query initialization: when CheerpJ supplies an empty cast-exception stack trace, it selects Spoon's existing exotic-JVM query mode. The pinned source is downloaded and the adaptation checked during the build. This change is limited to the docs' generated dependency; the verifier repository and published sources remain unchanged.
5254

‎scripts/playground/build.py‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@
44
import subprocess
55
import shutil
66
import urllib.request
7+
import xml.etree.ElementTree as ET
78
import zipfile
89
from pathlib import Path
910

1011
ROOT = Path(__file__).resolve().parents[2]
1112
WORK = ROOT / '.playground-build'
1213
OUTPUT = ROOT / 'playground/runtime'
13-
VERIFIER = '0.0.35'
14-
API = '0.0.7'
15-
Z3 = '4.8.17'
16-
SPOON = '10.4.2'
14+
15+
16+
def dependency_artifacts():
17+
namespace = {'m': 'http://maven.apache.org/POM/4.0.0'}
18+
pom = ET.parse(ROOT / 'scripts/playground/pom.xml')
19+
return {
20+
dependency.findtext('m:artifactId', namespaces=namespace): tuple(
21+
dependency.findtext(f'm:{field}', namespaces=namespace)
22+
for field in ['groupId', 'artifactId', 'version']
23+
)
24+
for dependency in pom.findall('m:dependencies/m:dependency', namespace)
25+
}
1726

1827

1928
def artifact(group, name, version, classifier=''):
@@ -33,11 +42,12 @@ def main():
3342
raise RuntimeError('Build the playground with JDK 17 (set JAVA_HOME and PATH)')
3443
WORK.mkdir(exist_ok=True)
3544
OUTPUT.mkdir(parents=True, exist_ok=True)
36-
verifier = artifact('io.github.liquid-java', 'liquidjava-verifier', VERIFIER)
37-
sources = artifact('io.github.liquid-java', 'liquidjava-verifier', VERIFIER, '-sources')
38-
annotations = artifact('io.github.liquid-java', 'liquidjava-api', API, '-sources')
39-
z3_sources = artifact('tools.aqua', 'z3-turnkey', Z3, '-sources')
40-
spoon_sources = artifact('fr.inria.gforge.spoon', 'spoon-core', SPOON, '-sources')
45+
dependencies = dependency_artifacts()
46+
verifier = artifact(*dependencies['liquidjava-verifier'])
47+
sources = artifact(*dependencies['liquidjava-verifier'], '-sources')
48+
annotations = artifact(*dependencies['liquidjava-api'], '-sources')
49+
z3_sources = artifact(*dependencies['z3-turnkey'], '-sources')
50+
spoon_sources = artifact(*dependencies['spoon-core'], '-sources')
4151
source_dir = WORK / 'sources'
4252
if source_dir.exists():
4353
shutil.rmtree(source_dir)

‎scripts/playground/pom.xml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>io.github.liquid-java</groupId>
7+
<artifactId>liquidjava-browser-playground</artifactId>
8+
<version>1.0.0</version>
9+
<packaging>pom</packaging>
10+
<dependencies>
11+
<dependency>
12+
<groupId>io.github.liquid-java</groupId>
13+
<artifactId>liquidjava-verifier</artifactId>
14+
<version>0.0.35</version>
15+
</dependency>
16+
<dependency>
17+
<groupId>io.github.liquid-java</groupId>
18+
<artifactId>liquidjava-api</artifactId>
19+
<version>0.0.7</version>
20+
<classifier>sources</classifier>
21+
</dependency>
22+
<dependency>
23+
<groupId>tools.aqua</groupId>
24+
<artifactId>z3-turnkey</artifactId>
25+
<version>4.8.17</version>
26+
<classifier>sources</classifier>
27+
</dependency>
28+
<dependency>
29+
<groupId>fr.inria.gforge.spoon</groupId>
30+
<artifactId>spoon-core</artifactId>
31+
<version>10.4.2</version>
32+
<classifier>sources</classifier>
33+
</dependency>
34+
</dependencies>
35+
</project>

0 commit comments

Comments
 (0)