diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 760023f0..bcea758a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,9 +7,12 @@ on:
branches: [ main ]
workflow_dispatch:
+concurrency:
+ group: ci-${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
env:
CARGO_TERM_COLOR: always
- MDBOOK_VERSION: 0.5.4
jobs:
build:
@@ -42,51 +45,10 @@ jobs:
# `ez-adam`, like `begin`, defaults to `desktop` (-> `dioxus/desktop` -> wry/tao ->
# WebKitGTK/GTK on Linux) -- excluded here for the same reason `begin` is: those
# system libraries aren't installed until the later "Install Linux dependencies"
- # step.
+ # step in the parallel desktop job.
- name: Build workspace (excluding begin and ez-adam apps)
run: cargo build --workspace --exclude begin --exclude ez-adam --verbose
- # --lib skips `xtask` automatically (it has no library target). `begin` and `ez-adam`
- # are excluded explicitly, not just left to `--lib`: `--lib` only filters which
- # *targets* get documented, not which packages are selected for feature resolution,
- # so either crate staying selected via `--workspace` still unifies its
- # `default = ["desktop"]` feature (-> `dioxus/desktop` -> wry/tao -> WebKitGTK/GTK)
- # into the build even though nothing of theirs ever gets documented -- and those
- # system libraries aren't installed until the later "Install Linux dependencies"
- # step, so this failed on the ubuntu-latest runner despite building fine locally on
- # Windows/macOS, neither of which route dioxus's desktop feature through GTK at all.
- # RUSTDOCFLAGS promotes rustdoc's own warnings (broken/private intra-doc links, bare
- # URLs, etc.) to errors -- `cargo doc` alone exits 0 on those, so without this they'd
- # only ever surface as a human happening to read `cargo doc`'s output locally.
- - name: Build documentation (deny warnings)
- env:
- RUSTDOCFLAGS: -D warnings
- run: cargo doc --workspace --exclude begin --exclude ez-adam --no-deps --lib
-
- - name: Install mdBook
- run: cargo install mdbook --version "$MDBOOK_VERSION" --locked
-
- - name: Install the live-examples mdBook preprocessor
- run: cargo install --path adam-lang-book-preprocessor
-
- - name: Build the adam-lang-book-live wasm bundle
- run: |
- cargo install wasm-pack --locked
- cd adam-lang-book-live && wasm-pack build --target web --release
-
- - name: Prepare live-book assets (manifest + Spectrum bundle + wasm/js output)
- run: cargo run -p xtask -- prepare-live-book-assets
-
- # Catches a broken {{#include}} path/anchor in the adam-lang book (adam-lang-book/book-src)
- # the moment a chapter or its backing tests/*.rs example drifts out of sync -- mdbook build
- # fails outright on either, so no separate lint is needed. A missing mdbook-live-examples
- # binary or wasm bundle from the steps above would fail this the same way.
- - name: Build the adam-lang book
- run: mdbook build adam-lang-book
-
- - name: Build the CEL language book
- run: mdbook build cel-lang-book
-
- name: Check begin app (renderer-agnostic)
run: cargo check -p begin --no-default-features
@@ -111,11 +73,22 @@ jobs:
- name: Clippy ez-adam app (renderer-agnostic)
run: cargo clippy -p ez-adam --no-default-features --all-targets -- -D warnings
+ desktop:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+
+ - name: Install Rust toolchain
+ run: |
+ rustup toolchain install stable --profile minimal --component clippy
+ rustup default stable
+
+ - name: Cache dependencies
+ uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
+
# dioxus's desktop feature pulls in wry/tao, which link against WebKitGTK/GTK on Linux.
- # No earlier step needs these: the workspace build/test excludes begin and ez-adam, and
- # the other begin/ez-adam checks use --no-default-features (renderer-agnostic), so this
- # is the first step that actually compiles the desktop feature on the ubuntu-latest
- # runner.
+ # This job runs independently from the renderer-agnostic Rust checks so package
+ # installation and desktop compilation do not extend their critical path.
- name: Install Linux dependencies for begin/ez-adam desktop builds
run: |
sudo apt-get update
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d0587d23..a9ad667f 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -3,6 +3,8 @@ name: Docs
on:
push:
branches: [ main ]
+ pull_request:
+ branches: [ main ]
workflow_dispatch:
env:
@@ -12,7 +14,7 @@ env:
# Only one Pages deployment may run at a time; let a newer push supersede an
# in-flight one rather than queuing behind it.
concurrency:
- group: pages
+ group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
@@ -29,18 +31,13 @@ jobs:
- name: Cache dependencies
uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
- # --lib skips `xtask` automatically (it has no library target). `begin` is excluded
- # explicitly, not just left to `--lib`: `--lib` only filters which *targets* get
- # documented, not which packages are selected for feature resolution, so `begin`
- # staying selected via `--workspace` still unifies its `default = ["desktop"]`
- # feature (-> `dioxus/desktop` -> wry/tao -> WebKitGTK/GTK) into the build even
- # though nothing of `begin`'s ever gets documented -- and this workflow never
- # installs those system libraries at all, so it fails outright on the
- # ubuntu-latest runner despite building fine locally on Windows/macOS, neither of
- # which route dioxus's desktop feature through GTK at all (confirmed against the
- # `ci.yml` build job hitting the identical failure).
- - name: Build documentation
- run: cargo doc --workspace --exclude begin --no-deps --lib
+ # --lib skips `xtask` automatically (it has no library target). `begin` and `ez-adam`
+ # are excluded explicitly, not just left to `--lib`: either crate remaining selected
+ # via `--workspace` enables its desktop feature and requires WebKitGTK/GTK on Linux.
+ - name: Build documentation (deny warnings)
+ env:
+ RUSTDOCFLAGS: -D warnings
+ run: cargo doc --workspace --exclude begin --exclude ez-adam --no-deps --lib
- name: Redirect docs root to the cel-rs facade crate
run: echo '' > target/doc/index.html
@@ -85,11 +82,13 @@ jobs:
cp -r cel-lang-book/book-dist target/doc/cel-book
- uses: actions/upload-pages-artifact@v5
+ if: github.event_name == 'push'
with:
path: target/doc
deploy:
needs: build
+ if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
pages: write
diff --git a/.vscode/scripts/create-worktree-from-pr.ps1 b/.vscode/scripts/create-worktree-from-pr.ps1
deleted file mode 100644
index 7d73827a..00000000
--- a/.vscode/scripts/create-worktree-from-pr.ps1
+++ /dev/null
@@ -1,54 +0,0 @@
-$prsJson = gh pr list --state open --json number,title,headRefName --limit 100
-if ($LASTEXITCODE -ne 0) {
- exit $LASTEXITCODE
-}
-
-$prs = @($prsJson | ConvertFrom-Json)
-
-if ($prs.Count -eq 0) {
- Write-Host "No open pull requests found."
- exit 0
-}
-
-Write-Host ""
-Write-Host "Open pull requests:"
-for ($i = 0; $i -lt $prs.Count; $i++) {
- $pr = $prs[$i]
- Write-Host (" [{0}] #{1} {2} ({3})" -f $i, $pr.number, $pr.title, $pr.headRefName)
-}
-Write-Host ""
-
-$selection = Read-Host "Enter number to create worktree from (or press Enter to cancel)"
-if ([string]::IsNullOrWhiteSpace($selection)) {
- Write-Host "Cancelled."
- exit 0
-}
-
-$index = 0
-if (-not [int]::TryParse($selection, [ref]$index) -or $index -lt 0 -or $index -ge $prs.Count) {
- Write-Error "Invalid selection: $selection"
- exit 1
-}
-
-$pr = $prs[$index]
-$branch = "pr-$($pr.number)"
-$worktreePath = ".claude/worktrees/$branch"
-
-if (Test-Path $worktreePath) {
- Write-Error "Worktree path '$worktreePath' already exists."
- exit 1
-}
-
-git fetch origin "pull/$($pr.number)/head:$branch"
-if ($LASTEXITCODE -ne 0) {
- exit $LASTEXITCODE
-}
-
-git worktree add $worktreePath $branch
-if ($LASTEXITCODE -ne 0) {
- exit $LASTEXITCODE
-}
-
-tokensave init $worktreePath
-tokensave branch add $branch --path $worktreePath
-code --new-window $worktreePath
diff --git a/.vscode/scripts/prune-worktree-branches.ps1 b/.vscode/scripts/prune-worktree-branches.ps1
deleted file mode 100644
index 14b2e217..00000000
--- a/.vscode/scripts/prune-worktree-branches.ps1
+++ /dev/null
@@ -1,31 +0,0 @@
-$porcelain = git worktree list --porcelain
-$activeBranches = @($porcelain | Where-Object { $_ -match '^branch refs/heads/(.+)$' } | ForEach-Object { $matches[1] })
-
-$allWorktreeBranches = @(git branch --list 'worktree-*' | ForEach-Object { $_ -replace '^\*?\s*', '' })
-$orphaned = @($allWorktreeBranches | Where-Object { $activeBranches -notcontains $_ })
-
-if ($orphaned.Count -eq 0) {
- Write-Host "No orphaned worktree-* branches found."
- exit 0
-}
-
-$merged = @(git branch --merged main --list 'worktree-*' | ForEach-Object { $_ -replace '^\*?\s*', '' })
-
-Write-Host ""
-Write-Host "Orphaned local worktree-* branches (no active worktree):"
-foreach ($branch in $orphaned) {
- $status = if ($merged -contains $branch) { "merged into main" } else { "NOT merged into main" }
- Write-Host (" {0} [{1}]" -f $branch, $status)
-}
-Write-Host ""
-
-$confirm = Read-Host "Delete all $($orphaned.Count) branches listed above? (y/N)"
-if ($confirm -ne 'y' -and $confirm -ne 'Y') {
- Write-Host "Cancelled."
- exit 0
-}
-
-foreach ($branch in $orphaned) {
- git branch -D "$branch"
-}
-tokensave branch gc
diff --git a/.vscode/scripts/remove-worktree.ps1 b/.vscode/scripts/remove-worktree.ps1
deleted file mode 100644
index 96207d59..00000000
--- a/.vscode/scripts/remove-worktree.ps1
+++ /dev/null
@@ -1,44 +0,0 @@
-$porcelain = git worktree list --porcelain
-$entries = @()
-$currentPath = $null
-foreach ($line in $porcelain) {
- if ($line -match '^worktree (.+)$') {
- $currentPath = $matches[1]
- } elseif ($line -match '^branch refs/heads/(.+)$' -and $currentPath) {
- $entries += [pscustomobject]@{ Path = $currentPath; Branch = $matches[1] }
- $currentPath = $null
- }
-}
-$worktrees = @($entries | Where-Object { ($_.Path -replace '\\', '/') -match '\.claude/worktrees/' })
-
-if ($worktrees.Count -eq 0) {
- Write-Host "No worktrees found under .claude/worktrees/"
- exit 0
-}
-
-Write-Host ""
-Write-Host "Worktrees available for removal:"
-for ($i = 0; $i -lt $worktrees.Count; $i++) {
- Write-Host (" [{0}] {1} (branch: {2})" -f $i, $worktrees[$i].Path, $worktrees[$i].Branch)
-}
-Write-Host ""
-
-$selection = Read-Host "Enter number to remove (or press Enter to cancel)"
-if ([string]::IsNullOrWhiteSpace($selection)) {
- Write-Host "Cancelled."
- exit 0
-}
-
-$index = 0
-if (-not [int]::TryParse($selection, [ref]$index) -or $index -lt 0 -or $index -ge $worktrees.Count) {
- Write-Error "Invalid selection: $selection"
- exit 1
-}
-
-$target = $worktrees[$index]
-git worktree remove "$($target.Path)"
-if ($LASTEXITCODE -ne 0) {
- exit $LASTEXITCODE
-}
-git branch -D "$($target.Branch)"
-tokensave branch gc
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 78fe50b2..ac1e348a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -19,8 +19,6 @@
"cel-rs/Workspace/begin: serve (desktop)",
"cel-rs/Workspace/begin: serve (web)",
"cel-rs/Workspace/book: serve (full)",
- "cel-rs/Workspace/cel-lang-book: serve",
- "cel-rs/Workspace/worktree: create",
- "cel-rs/Workspace/worktree: remove"
+ "cel-rs/Workspace/cel-lang-book: serve"
]
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 20051033..13627586 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,66 +1,6 @@
{
"version": "2.0.0",
- "inputs": [
- {
- "id": "worktreeName",
- "type": "promptString",
- "description": "Worktree name (e.g. my-feature) — branch will be worktree-"
- }
- ],
"tasks": [
- // ============ Worktree Tasks ============
- {
- "label": "worktree: create",
- "type": "shell",
- "command": "git worktree add \".claude/worktrees/${input:worktreeName}\" -b \"worktree-${input:worktreeName}\" && tokensave init \".claude/worktrees/${input:worktreeName}\" && tokensave branch add \"worktree-${input:worktreeName}\" --path \".claude/worktrees/${input:worktreeName}\" && code --new-window \".claude/worktrees/${input:worktreeName}\"",
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "problemMatcher": [],
- "presentation": {
- "reveal": "always",
- "panel": "dedicated"
- }
- },
- {
- "label": "worktree: create from PR",
- "type": "shell",
- "command": "pwsh -NoProfile -ExecutionPolicy Bypass -File \"${workspaceFolder}/.vscode/scripts/create-worktree-from-pr.ps1\"",
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "problemMatcher": [],
- "presentation": {
- "reveal": "always",
- "panel": "dedicated"
- }
- },
- {
- "label": "worktree: remove",
- "type": "shell",
- "command": "pwsh -NoProfile -ExecutionPolicy Bypass -File \"${workspaceFolder}/.vscode/scripts/remove-worktree.ps1\"",
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "problemMatcher": [],
- "presentation": {
- "reveal": "always",
- "panel": "dedicated"
- }
- },
- {
- "label": "worktree: prune branches",
- "type": "shell",
- "command": "pwsh -NoProfile -ExecutionPolicy Bypass -File \"${workspaceFolder}/.vscode/scripts/prune-worktree-branches.ps1\"",
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "problemMatcher": [],
- "presentation": {
- "reveal": "always",
- "panel": "dedicated"
- }
- },
// ============ Begin Tasks ============
{
"label": "begin: serve (desktop)",
diff --git a/README.md b/README.md
index ce6e2375..5527d261 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,14 @@ long-term direction behind each crate in this workspace.
- Rust (stable), installed via [rustup](https://rustup.rs/)
+### VS Code worktree tasks
+
+The repository does not define `worktree:` tasks. Worktree creation, removal,
+and branch pruning live in each contributor's VS Code user tasks (**Tasks: Open
+User Tasks**) with their scripts under `~/.vscode/scripts`, so they work across
+repositories. Whatever tooling you use, create worktrees under
+`.claude/worktrees/` on a `worktree-` branch.
+
### Clone and build
```bash